From patchwork Thu May 9 07:32:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 795759 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72DE31482EA for ; Thu, 9 May 2024 07:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715240035; cv=none; b=fqVCAz4WwFhvPzOWuxLY23njxEu2o7LiNVbKYHj0nI73iQljdz4+lvNwsF4p/dDnVusOS80EMLW9p94clf/DKs7aohiVIRERUtmKc07AJc6SNgM6Q1W1v9yq9OEqLnJFU1vVnwT1mQ754gwk+eR+HxZaYXpHXSjgI/9ZuW4yCEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715240035; c=relaxed/simple; bh=f1DDzJv3xHeLtz/8Uh38H6uqD2mqnmTd8LGL7fsQk2Q=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YGHF8i7IvN9ZQyVhwHbIq1EJ1dt/h2NSj+vQIf7j6tunhXYNn71z8DaQfIamgSEoOqhNtqzcxXOvN7e38C3nDaCjKYi8dO1ue1uLQdsWNkWSPx6SmKio3R8za6QDBcOrh/rvKsA3urr2ytgx2x6dMUC3gRQ+J1YRFKnslx2vp/U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=aqfQ01hI; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="aqfQ01hI" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1ecd3867556so4543135ad.0 for ; Thu, 09 May 2024 00:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1715240033; x=1715844833; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+aKuxY2Fk4OLcsa0CSr6w7+nYt28fnnuhVioZfggdrc=; b=aqfQ01hIYY6LFNp/UQ5dLvubDCRG2/sLLSALQUBi+Wlplrx5tk2Wx5rdy/FJPMWMLI zjGNDZGSl8+Aay5pLWs3V1ncqpUwnPrD8B5bK1pBums+YbqOizIDpn//cX8Do0+moepi nuxLZ5uU8tTJlCW5rlfmTQRuqCsEuwpE5T4gZ3mY6BGk+2ls7gNpTFYHp9ZcC49FSO1P +bd0pqsih40lvi0ApqXUKbLHdHD5B+6rX89NjUbry4HeyG+ty44px2pK6tzqVqIoGnhO lAvnXludBgkIgs/3LQ8O/vJDJeNw/4tFlqK01xHLE/MJR/d410QFFgJVTv7xey3gDFVB dOVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715240033; x=1715844833; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+aKuxY2Fk4OLcsa0CSr6w7+nYt28fnnuhVioZfggdrc=; b=VbMg3Tz+kaSZil/eFxn99BfdPmMZvT21dWwJOYNFkSMR/7MTcQSlOsPO+PF2Gna06d ItOcawAXAcFtN1ItZb6Rxeg7IUqe35g4m0lOOVURT1yLs0RaPo288JFRMsNPuO7mRyp8 +wlQGQh0ARyz/9K2KgnmjCNrDZhaLcfAgef71dmus5utj27YsImwA4CECnAZRMEJN9wg ukltO952mjlO00x3eViA2WPp9By80ZdE3H3uaZ4TBYiuP0JK8mz3F/z8sZ09zi+bdUW6 Isd58zo8dk62n+Xfw2Pgzr4Wbl5SEigH7cdr5XVKSqerpDnhpNm5QECmaVI9u4IM/EB1 pzdg== X-Forwarded-Encrypted: i=1; AJvYcCVKcDLb7zSfKf/IoR0BJz0ryDb8/UfIUB1rZRk5+/ovE32IndbBiwljwhqiEDvqUJ3Eu4Oa3trEiZbu9NxEtIxyNt7paklSfIYZtg== X-Gm-Message-State: AOJu0YxwiLHimoCA9syiyr0ne/oQWGWIsoMVaN02UgZ4aoYMHvQasJLu KvSJ17cAa6GsIa+vAmj80XSObITngD1hL9pc9GDQsc2PZK4zx6mf5I993RtmOhY= X-Google-Smtp-Source: AGHT+IGAYwKBi2oqjWz3LiGpENreMeENH67yYk920FAgS7TcHb0bpY6oL9Li9tUP+YyE2Ur4qM9EGA== X-Received: by 2002:a17:903:40ce:b0:1ea:9596:11eb with SMTP id d9443c01a7336-1eeb07973fcmr50940325ad.60.1715240032758; Thu, 09 May 2024 00:33:52 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0badcbacsm7519045ad.97.2024.05.09.00.33.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 May 2024 00:33:52 -0700 (PDT) From: Yunhui Cui To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, sunilvl@ventanamicro.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, bhelgaas@google.com, james.morse@arm.com, jhugo@codeaurora.org, jeremy.linton@arm.com, john.garry@huawei.com, Jonathan.Cameron@huawei.com, pierre.gondois@arm.com, sudeep.holla@arm.com, tiantao6@huawei.com Cc: Yunhui Cui Subject: [PATCH v5 1/3] riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init() Date: Thu, 9 May 2024 15:32:58 +0800 Message-Id: <20240509073300.4968-1-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 ci_leaf_init() is a declared static function. The implementation of the function body and the caller do not use the parameter (struct device_node *node) input parameter, so remove it. Fixes: 6a24915145c9 ("Revert "riscv: Set more data to cacheinfo"") Signed-off-by: Yunhui Cui Reviewed-by: Jeremy Linton Reviewed-by: Sudeep Holla Reviewed-by: Jeremy Linton --- arch/riscv/kernel/cacheinfo.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 09e9b88110d1..30a6878287ad 100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -64,7 +64,6 @@ uintptr_t get_cache_geometry(u32 level, enum cache_type type) } static void ci_leaf_init(struct cacheinfo *this_leaf, - struct device_node *node, enum cache_type type, unsigned int level) { this_leaf->level = level; @@ -80,11 +79,11 @@ int populate_cache_leaves(unsigned int cpu) int levels = 1, level = 1; if (of_property_read_bool(np, "cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); if (of_property_read_bool(np, "i-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); if (of_property_read_bool(np, "d-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); prev = np; while ((np = of_find_next_cache_node(np))) { @@ -97,11 +96,11 @@ int populate_cache_leaves(unsigned int cpu) if (level <= levels) break; if (of_property_read_bool(np, "cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); if (of_property_read_bool(np, "i-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); if (of_property_read_bool(np, "d-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); levels = level; } of_node_put(np); From patchwork Thu May 9 07:32:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 796575 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DA391494D9 for ; Thu, 9 May 2024 07:33:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715240041; cv=none; b=tLR5+lCUINjbmb7gQflrCLWuiLxFiT+eE4/o0a9MxjSj3Cjx9+MJO5f3XzWTQ060m0HpJDUvwLl5Xzv9M+4xJzCv4KVSCs9ZdFM6evyPmGVkvqLwzomn2unY09Pw5OO04/3zs8JWEaE7TIKgrRGFfAjjvK0MS/lk66IbPZ0tN4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715240041; c=relaxed/simple; bh=sCpUWY3HzIVMI3TbeegEZ/zm4GDQ+yecC/8p7PvVbno=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bUBUYi5e3EqxzzNQnofk/mqKG2E6DczW/0mqUsphuzKMePo1wUu7Cqvp3IqiJkNp7BZTvxnw5MJyVMlmbIPDyo0xyMevv2tZ0JfpKxiBy/jYOHHoibZDJEOtg3avzkdiAb5pycZWSfmIIns+uBqKL48pBTzouHc/oGHohDTYcUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Rctwutpa; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Rctwutpa" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ee954e0aa6so3829495ad.3 for ; Thu, 09 May 2024 00:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1715240038; x=1715844838; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7cwpsa2HL8S5jIz0x6grJAB8mOqnJkhHeKGCfgHpfOE=; b=RctwutpaGCvx7q08udDRVSsO3Q3+gNTCiU23tJP2hz1rw5/i6fVG+5C57Ncpelc+Tv mmufeibCLuk+luPj67E/El5R/duxtkqPnfSEK4ypc2t9NFQHxUecykK5RiSqkJG/hudE ebODZcSBAkVbXYag1S1ZKpF6WjPtVoA/H5BvoWf7hf9nCAPXiuXPIt9jv5IuK8FjcD8T 7EBzbkOUtEV57TaS8C1iiHq+x/T4UW7l/gmMFPtK3K96wOzhLtLi2G/WLzxaPR3HcAk1 SzqprbkBsHweEBmV+k4oyVD2OKxmgru9V/0jUo7qBaqpCocAR82Wi/nB0f9Lf/3ZQf3V eAjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715240038; x=1715844838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7cwpsa2HL8S5jIz0x6grJAB8mOqnJkhHeKGCfgHpfOE=; b=WQYRuqhnRoWsbcOEf2q9Qlp+SlASYtMYHg/KgHgEsUqKhylbaK5ipH0BiZX1zfvJxj iX1rbtTp8fO1m9yhgaJnvd5bMG13mIisiBwkabufUtJBb5n+RhMmiRobRlhPyhEmNjWX lNEDx7Famkt26TsKn+5dwsoHKWnKK3VldSYmYiwFldZ+aBQVvVWZ64wyHmBPwWiZfmk4 eGDGyhfVjsBx3WUDy//0oTrD8hqifkQM5L6r3GqLZLIET7u1jUd/nUmtrLi+H4D3ySR8 JBKOrzZ9lviMvDvYmG1HBpbqFWay+OStHfwPi4zy2sox11pTI5kwhs9gYcOU1WfIsiJX Qcug== X-Forwarded-Encrypted: i=1; AJvYcCVMfrqzM4uZFwcdk3Oe1h3c0KCeWySD9V/ulA0O5WRz9H3DXDnIiPuYXpEyGHmSd9w4jX9gSUD/zhy+J0WHAx018V9aznYe9RkRLQ== X-Gm-Message-State: AOJu0Yz92dQZLD+FiO1JvRedtjouWBXXgwpszBv2gy876ngWg0VB+3/D IQhpqzpRpydKuXSCjanY1kE7pkjeVdiHf61Rpy1i40T2VTEVLX1CGynPXmUdHFc= X-Google-Smtp-Source: AGHT+IG/D+4lV51kE6nf+1RISOvQK/tQQrWPzktPgLKIYfH6V7gZRVDpOTsPNQO9YGcb3oeKoFgoIg== X-Received: by 2002:a17:903:258f:b0:1ed:1d37:267e with SMTP id d9443c01a7336-1eeb05919damr43288965ad.16.1715240038702; Thu, 09 May 2024 00:33:58 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0badcbacsm7519045ad.97.2024.05.09.00.33.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 May 2024 00:33:58 -0700 (PDT) From: Yunhui Cui To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, sunilvl@ventanamicro.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, bhelgaas@google.com, james.morse@arm.com, jhugo@codeaurora.org, jeremy.linton@arm.com, john.garry@huawei.com, Jonathan.Cameron@huawei.com, pierre.gondois@arm.com, sudeep.holla@arm.com, tiantao6@huawei.com Cc: Yunhui Cui , Conor Dooley Subject: [PATCH v5 2/3] riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT Date: Thu, 9 May 2024 15:32:59 +0800 Message-Id: <20240509073300.4968-2-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240509073300.4968-1-cuiyunhui@bytedance.com> References: <20240509073300.4968-1-cuiyunhui@bytedance.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Before cacheinfo can be built correctly, we need to initialize level and type. Since RISC-V currently does not have a register group that describes cache-related attributes like ARM64, we cannot obtain them directly, so now we obtain cache leaves from the ACPI PPTT table (acpi_get_cache_info()) and set the cache type through split_levels. Suggested-by: Jeremy Linton Suggested-by: Sudeep Holla Reviewed-by: Conor Dooley Reviewed-by: Sunil V L Signed-off-by: Yunhui Cui --- arch/riscv/kernel/cacheinfo.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 30a6878287ad..d6c108c50cba 100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -3,6 +3,7 @@ * Copyright (C) 2017 SiFive */ +#include #include #include #include @@ -78,6 +79,27 @@ int populate_cache_leaves(unsigned int cpu) struct device_node *prev = NULL; int levels = 1, level = 1; + if (!acpi_disabled) { + int ret, fw_levels, split_levels; + + ret = acpi_get_cache_info(cpu, &fw_levels, &split_levels); + if (ret) + return ret; + + BUG_ON((split_levels > fw_levels) || + (split_levels + fw_levels > this_cpu_ci->num_leaves)); + + for (; level <= this_cpu_ci->num_levels; level++) { + if (level <= split_levels) { + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); + } else { + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); + } + } + return 0; + } + if (of_property_read_bool(np, "cache-size")) ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); if (of_property_read_bool(np, "i-cache-size")) From patchwork Thu May 9 07:33:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 795758 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6F9D1494D2 for ; Thu, 9 May 2024 07:34:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715240046; cv=none; b=VVpwGOUDOAZmNO9N6B5nOcqV2wScvQa4HpHp5/fG6MWJYvs7nG7DlnULvP8C5XyqWl3KaN2E0GYhV4A4+1/7jTlrqzAHxk+9cewfvCIGy1pmntexvIwWRvrnNpoZ+JJW28+ZBCXQNJkA0ozh2CTz8rqzqKW12h1SR+SZb0yktK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715240046; c=relaxed/simple; bh=vniUVQGgbZH5XUSS0fWMGrRPi3jnpi6vMBuF5oFpj5c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RDoK7KaNAoqTc5kAQa2JOaUdBugRPuktfx/CGTGwRmIID2DfcmzTuFzdlhsXbyTwgKiiVzwnHhckgoHXy7CzIom6hxT4Lt0KYaYdKPQl+HNd/DzY8XrC6UrOUL3MB1fY2ycWiELtcZ8rURSzdO3OqD4rLN8yXxH4A2WyJFH5tFw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=g1fDjsbs; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="g1fDjsbs" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ed96772f92so4542885ad.0 for ; Thu, 09 May 2024 00:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1715240044; x=1715844844; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rKyIwcUjX1px2GE9S/CV6LaiV7WK04/0FO5MZQuO7/8=; b=g1fDjsbst7ad8k8lQWtbN7JGT80QYWnBoTfhclJ8H/Mi3u4Hca3tE9xmdpugMlgUaK e88QRRy5Elyzjv7ktZu4+4/azY7viYIBagOskDNKPBBCFyOggo1zLiijIUQ3bY3K7jTe Y1PsLoRwVkgr0XDUzNFuvCVOWoHFE6vyXY8oY+naoBIGP1Wb8f4Kdkwwo9yuytR+VpF0 f5Iv6qHkvzUbjQIqWzia9nQbdDICcbBLYM7Q5jYBaGa8sgtYotwp6ewayy8JDvlhxTmp QISBtSfo56bykLMiKLnOfyAXjYrP2VUNKZHM0D2VMaJcazzb6BBmFR8M+uOhrqQqEddN ozAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715240044; x=1715844844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rKyIwcUjX1px2GE9S/CV6LaiV7WK04/0FO5MZQuO7/8=; b=dJWpSbTv8+Olrzq+EIvkXOUHLta036GkfE1kHp1jKW3fjSxs+NVYWW1exzihJdSSTn ncXeLKVdkLLBJ6aOWfSxsbxk6qS963qiBRruxZN17vQnWHoj6Q4Akq91feuLXwh2jtcM pLM8kPO/CgZ30mLg62ON0U/j6k4suB8j2kczvFxizg/ZwLtH2HPJw+WmoNiSmKyY+k9/ BbZRvR6sDKB4b1im/b21B+/ee6oh8pxoZVqsK3Upvz5C9ANSDYDIZhVFAM+8YzqEA0Cc SmU6RkIRiRtjKj3IL5d9bxgL7zzOctb0fDQOiEE1WutMR51bpYQ0WGx15UTXJoVanQmW KVSw== X-Forwarded-Encrypted: i=1; AJvYcCVdMpOqaGVjxcfTqPNczGdC+0BDuoCJCqTMzEhh0OE5oy4Lo4JfYgR1F8CM1gA8v7Vn9nnC9EHFdnR0+usgCzja9QX2mgXLehIQew== X-Gm-Message-State: AOJu0Yxz0qfXJhQePRjoPjPMnDyn/OBvCkgSvHUMdvrHj7ta7LvfE9cy tW3k6cR9ce5RnB8deBUbIMt6E2NvibcJ2TfcNbTUPjyiYs5MiYw6tGlULO2VYMM= X-Google-Smtp-Source: AGHT+IENrFpPXQtPzNwMxYR+E7KfhtE+rzld4e5iGLrKkEoGDyF4zweRjT/2jAKH/f68/NFj3s2ryQ== X-Received: by 2002:a17:902:d183:b0:1eb:144f:63b7 with SMTP id d9443c01a7336-1eeb078e5bbmr34244655ad.56.1715240044153; Thu, 09 May 2024 00:34:04 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0badcbacsm7519045ad.97.2024.05.09.00.33.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 May 2024 00:34:03 -0700 (PDT) From: Yunhui Cui To: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, sunilvl@ventanamicro.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, bhelgaas@google.com, james.morse@arm.com, jhugo@codeaurora.org, jeremy.linton@arm.com, john.garry@huawei.com, Jonathan.Cameron@huawei.com, pierre.gondois@arm.com, sudeep.holla@arm.com, tiantao6@huawei.com Cc: Yunhui Cui Subject: [PATCH v5 3/3] RISC-V: Select ACPI PPTT drivers Date: Thu, 9 May 2024 15:33:00 +0800 Message-Id: <20240509073300.4968-3-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240509073300.4968-1-cuiyunhui@bytedance.com> References: <20240509073300.4968-1-cuiyunhui@bytedance.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After adding ACPI support to populate_cache_leaves(), RISC-V can build cacheinfo through the ACPI PPTT table, thus enabling the ACPI_PPTT configuration. Signed-off-by: Yunhui Cui Reviewed-by: Jeremy Linton Reviewed-by: Sudeep Holla --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index f961449ca077..a9ebecd72052 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -14,6 +14,7 @@ config RISCV def_bool y select ACPI_GENERIC_GSI if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI + select ACPI_PPTT if ACPI select ARCH_DMA_DEFAULT_COHERENT select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2