From patchwork Sun Apr 14 02:58:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 13628879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C62AC4345F for ; Sun, 14 Apr 2024 02:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=KiYYmvz6JUBsJnREijqNM8s9YGer4MJ4oBq6vXF/T1k=; b=flQgpxGqRZAm9c GRdkhkIdeuTTY5PTUejUp40waRa4Zohp7fEyPmsQBbFyxqGQUXz9NArAkH28zWrbObh1wr5ZhbH5s roz3siN4f+9qB8JY/DM9o/lxN7zWMacA/U7QP8gk8zE+0P556yySZ86aziHhPKdyst7JB1s2iJG0i 8m/Gd3EYkHTsk0cTajIdnEf05RfTSrLrTuqymD3kJqAgo7tZaFie132NUunwjfsykJ8BtGTl82k9L c2NKKTAAlUmLNs8Vywclm5eqx6+62f9GTcajp8qEd1DjYRDVfiQxNmt4L/2uMErGpEN8F6slX2ONw ZrZNV3FbmOGzmgYaLAFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvq5p-00000004RkX-3EkC; Sun, 14 Apr 2024 02:59:45 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvq5l-00000004Rhz-2oP1 for linux-riscv@lists.infradead.org; Sun, 14 Apr 2024 02:59:44 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e4266673bbso17656445ad.2 for ; Sat, 13 Apr 2024 19:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713063578; x=1713668378; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PQZbXYtBh7IQ8zFAgTStWmYnvk6O15njdv6RlNb8FnM=; b=D+MjZW/P4oi9Zy5ZV7QAM7SkGtiqYPeFuF6X6xyXum2FiU2WfbEL1qridwKIGnzK/F 55yv+VKpb1WR2FgDsmlVZBefjb6Gl+vJAwA3NyD/6InAgRjpG/+823ZEwS1b1O7OHh3H EFfV3s6uIniZ4gMXu450h+Dmr/PKyonhm5u3qHDResA9zNYcDzvgKhBFjWgXWBB5atwm 5l/Nn3AHgJgsh1XcrQyPvMOjJv1J2fZdLeu8jdfkVt1EGIqP5OnkiAPfOjMrr7IkqsVl 4b6t9ix9jzhF3OiDKYgNwYFMVfIMTNxR6y03lCrF8cMRTuFKP8Bvkfk/YpopVWnaZmGO tO1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713063578; x=1713668378; 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=PQZbXYtBh7IQ8zFAgTStWmYnvk6O15njdv6RlNb8FnM=; b=NX/mBFhFAYcc1enStzTOc1ciRtryyQEtRY3AwsyqzBpOwwqsKFfnxPcgd8GiwRmgzk pwMpOVpYNXGJBDqeZ6QWsaNN6FgxemM6bUXymypOyP2oeBXM4V5m769V4R5bn1jZURCx fHAKJZRD3zWPOdXALcpXBC4OlS8IdDo228vGkKEW73obSbDbm/DHh+UbB1xrXj66Wav7 AaKpGstXMk7cCju8m8Sgbq2xwX2FyqtFjr9EI/Gq/NkX6kV3DGrWFVB9uGMY5GwphyUF kben2Fd0A6tmzdgrVSr6JelPgzJheb/uJaaqLVsuJjetp/ZEtiz7Hqk7spoMOoqon20A /UXA== X-Forwarded-Encrypted: i=1; AJvYcCVyTVkD6ivaTCwC2gh/F7r13qf2XaQbw8j51CENZhbrdO53ZUcQ8aRn1uVX1QpziE1qbd8q1WjjUGAjmcNZxYVUmBi+BmAbOPCA0w+UP1f+ X-Gm-Message-State: AOJu0YxIFbtrhMp/wyFYJ3Kr/1lLq0emguOgu682bIrx3doJNvNJO8lP 0Vo7wFDCLSov+jPN3mSrVebIIyN8ql3CqJkOfH4jqncyoNMxzNRSGJEv1HUmkrM= X-Google-Smtp-Source: AGHT+IG7b7aVnf3Zx6K5E292MakYH/snzrvJ2cHDzaIo1qp/4oj8mSnNTvgLFCUzjYXaXUBKeIJdDw== X-Received: by 2002:a05:6a21:7e86:b0:1a8:2cc0:290a with SMTP id th6-20020a056a217e8600b001a82cc0290amr6050259pzc.30.1713063578513; Sat, 13 Apr 2024 19:59:38 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([139.177.225.246]) by smtp.gmail.com with ESMTPSA id cx15-20020a17090afd8f00b002a219f8079fsm4799913pjb.33.2024.04.13.19.59.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 13 Apr 2024 19:59:38 -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, 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 v2 1/3] riscv: cacheinfo: remove the useless parameter (node) of ci_leaf_init() Date: Sun, 14 Apr 2024 10:58:24 +0800 Message-Id: <20240414025826.64025-1-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240413_195942_046071_DB90E2E7 X-CRM114-Status: UNSURE ( 8.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The implementation of the ci_leaf_init() function body and the caller do not use the input parameter (struct device_node *node), so remove it. Fixes: 6a24915145c9 ("Revert "riscv: Set more data to cacheinfo"") Signed-off-by: Yunhui Cui Reviewed-by: Sudeep Holla --- 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 Sun Apr 14 02:58:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 13628880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 277A4C04FF9 for ; Sun, 14 Apr 2024 02:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9z81A7+1Fl02aHYWmiRhfE6Stq8xWjy5ACmO7wBaiP8=; b=fhjtNXgE0ipo/z pWsiEPfWbmTCg+rb6YrUMHmL71J0Q+GaE6y6xudXunMLXASaTv9Hcs1Xz0306BRrPSNjHhcWeHwz+ 1rDYBvacFJ9mNaKOJpEeY37VzfaUD42PRwtJBcKzPH6myTrN9R9XLTftw6ZKvvoj6rZcDTc4CQRxI fZ5+6pq3FySgqNuF1RCBIqb2r3Eubp613z5I6IqVR5BUrT4pjXD5TVAwvP4lfYa6GjvQhWg32OlZA cJZdyu6GGkgTBP7qjqy7UMqzg/0ZyGsJg1Ujiuz9H9E2jMUKy2XNY5jMsa8TFdVPX4YvGeI/AdkAL GDy8HfmYkzi0sUNG4cqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvq5r-00000004RlM-2XhA; Sun, 14 Apr 2024 02:59:47 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvq5p-00000004Rk7-23ri for linux-riscv@lists.infradead.org; Sun, 14 Apr 2024 02:59:46 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5f415fd71f8so1696403a12.3 for ; Sat, 13 Apr 2024 19:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713063584; x=1713668384; darn=lists.infradead.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=a+iJ/bWcbs5TbNYkdodB+bg4kp9o+X2TePK5VotNZ5U=; b=dAzh/aZWO7ajiPlqJE4LL+VGc+JpFi2BjG5nWDOBQHhBv5pDr7FgExeBtVK3nrfKn1 R49Nh1OqCrqdCWQIWEV9q4LlMLqwpzZKyvezc6xStAnNlm1kKKoQD7JqwmLB/vfo+LEq l55x22fXrxN9JC4ZvfxU5XOSEcrmsJLkQWdgf4ZnVcmDT0bRY66AGq8I+uEh6A87BvCR 3iUYYHZJxiXrxXtBFV82kmBn6Wsc3fXR5NGR6ooKaXfalebcgNt+5PFZkiyG7hA7eTvI 1h9RpzCXXpBkdQ6pzEBTC9CXNQanLV4bN3WgUd9kpnLbdfJfYwbu/CjJfEmLN1Fn8cGU us/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713063584; x=1713668384; 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=a+iJ/bWcbs5TbNYkdodB+bg4kp9o+X2TePK5VotNZ5U=; b=gunpZjVsnSBf+1lDCc3bNuxxfXV2m9FEuSbw8ohlSjwLd1Q/GIrjSbbI2q1qxEuGuH TeYC3a91WyrRPMb02WjZJNf55ZIW286m2T5KkmhH4yKaPPk+CNUOXNdUJHI3DMZjPrSO 0X0hrrIWt4toz1LL4HluSKGVpdHpvXW+bwxmyVjy+gEt1Te8dEVzHqfPArjgtDrO5CkB RqBH2DMtjkuH+RdCmZdWWZf9h8bQ5/mUM3hhi4es+wLS9aafErATYtLtnO/oIpK5MrKZ EWYegX3DJfcw8Jrw+Lkwv++colJVMTmTJIJ4CnDxJzf/aQ/kTHnm7nuzlTBS4iRM5Nr6 LvUA== X-Forwarded-Encrypted: i=1; AJvYcCXcbZFZN8IOHKn5NVR41fZKXLpaOiZkGe6tYA1XnAsKOYMd+NjF9M5OghjM68Rq4dkcz0dytuPD/7QS15ryKmMF75SmTWP0Q6IYtzQwa+LL X-Gm-Message-State: AOJu0Yy1655rW9jrp1iCVrpXMBaiZeHGvii604gJrD8/KzVw27iFkc8X kslJyliWE9MKtzNcfjiuOHdCe+mE1fi5cxLhrKhUe1+cfF7dn6eU2Q/R63VqUD4= X-Google-Smtp-Source: AGHT+IFC7Ostz4NVqRl+TdyivWIDYqcK3ZnTae/PQDs3xYi5nfAgFK24gkFZANSYBnnATXXDHJF4Cw== X-Received: by 2002:a17:90b:80a:b0:2a5:513:921e with SMTP id bk10-20020a17090b080a00b002a50513921emr5443131pjb.31.1713063584355; Sat, 13 Apr 2024 19:59:44 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([139.177.225.246]) by smtp.gmail.com with ESMTPSA id cx15-20020a17090afd8f00b002a219f8079fsm4799913pjb.33.2024.04.13.19.59.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 13 Apr 2024 19:59:43 -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, 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 v2 2/3] riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT Date: Sun, 14 Apr 2024 10:58:25 +0800 Message-Id: <20240414025826.64025-2-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240414025826.64025-1-cuiyunhui@bytedance.com> References: <20240414025826.64025-1-cuiyunhui@bytedance.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240413_195945_559201_E65E2119 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Before cacheinfo can be built correctly, we need to initialize level and type. Since RSIC-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 Signed-off-by: Yunhui Cui --- arch/riscv/kernel/cacheinfo.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 30a6878287ad..ece92aa404e3 100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -6,6 +6,7 @@ #include #include #include +#include static struct riscv_cacheinfo_ops *rv_cache_ops; @@ -78,6 +79,28 @@ int populate_cache_leaves(unsigned int cpu) struct device_node *prev = NULL; int levels = 1, level = 1; + if (!acpi_disabled) { + int ret, idx, fw_levels, split_levels; + + ret = acpi_get_cache_info(cpu, &fw_levels, &split_levels); + if (ret) + return ret; + + /* must be set, so we can drop num_leaves assignment below */ + this_cpu_ci->num_leaves = fw_levels + split_levels; + + for (idx = 0; level <= this_cpu_ci->num_levels && + idx < this_cpu_ci->num_leaves; idx++, 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 Sun Apr 14 02:58:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 13628881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91E6BC4345F for ; Sun, 14 Apr 2024 02:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QDTyzKUMYgq0HyvymhD07Mi0MvLp2Y3ck4Aw+YQsltg=; b=YydwAAA3sF/kii ru1Ms6TnvdBx4953LnJJuaQZUkpLMEiaHAC6Zoox8PiMhsx4dIRJ4IijrLrWuh0cnNBAviFzMUlo2 mkRlhOLwTIM5xJ4KAyfig1u2fMYfBjjxF1jZIEaEyh1lTHktomL+YXbt86wVkZNL5rBeN7skGl6Tm cUpvWYBzuLcZ/Vq20QzJCcWqnzELiYbAgahm7mMNLlce5dFCJ6rMLWTemWK8dGHq/UqFOKsv3Z5IQ BZyZ6LFHX2ULJdfO2ycOmNLM3s2nJyRXqHZ75qYtr/wvkWR12Yte1KytkTabBCnPsf1BfqPpic7bB 6F0nvnfACJSywrdChv0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvq5x-00000004Rn9-2shu; Sun, 14 Apr 2024 02:59:53 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvq5v-00000004RmH-0tBV for linux-riscv@lists.infradead.org; Sun, 14 Apr 2024 02:59:52 +0000 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6ed2dbf3c92so1605751b3a.2 for ; Sat, 13 Apr 2024 19:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713063590; x=1713668390; darn=lists.infradead.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=hheiXqV+1wPbN2r8XTJ5OPePJHFHtIdLdr/kVMTR0TE=; b=H0EPAJgMz4YJHcYFMyZ4EFg55oS0yysJYaWxaydN8uIzm8uI4hsFUtORNuEPCTyX7S tI+VPUPIcx0f/pJHQSPwUalA3wIGs0Ha5n2NRXagosEY5/21ihryRmFko1c5pu0SU060 x7KjuL7ihCQm6GkAtiKUJW5WxU22DGSAdrG8NYqXpfKooS7w5l73Qx5+MLz+bLHdscaZ 8aG80iaNH2M8+sEsxRPO6RBAfNWpkKHfxxOKRF4eZDLgMxCZw+4e8YzscIN0xc36cNZw hCjKr7QWl3h4bvK5FinvzGFw7FXWVTib6UG+Ro3ZUl6jOZGZerD8zTkCdrVGhh9wQ0zh /WrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713063590; x=1713668390; 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=hheiXqV+1wPbN2r8XTJ5OPePJHFHtIdLdr/kVMTR0TE=; b=bLT84xEFP+KR/UhvroVHVpq/04Y+QFzYOKgK0AgGdiuCQrtc4s4QmeVyyTtieGZdE8 HyEuut5B+J8RGNJPpdPITBJY8bqfo3J7ArNOXsaVfX+caA9759eXV0jiea9ltmzRIt5k Xh8uVUOKpj6lI8T6Pio9BDKw9dVlprzknPvlWziXREqfS+ddCwAobRLkcPI0JKox5gz1 2vWuPZFz70G9BQObfHOrvxgwpCMYomuy/arJA40aT676AN5H0ZpeXY7sV8YmDEnCpHkX SZ6blGEaQUpfFbfkqLzoShayyhQeCDenFVNJrB8o1uvrZAlCUxZSPZyf31L8yKPyTVYp 6qeA== X-Forwarded-Encrypted: i=1; AJvYcCVJszOpJKmI+rZ9Mj63nLsmS1lcHfcEcdguTaHh28bLdSag4WNOdJcGGEfVJ25W+yhhbD+aIPil/mqj8+ulvv3rlj7+AyA9Lffr4ywVOPFa X-Gm-Message-State: AOJu0YyVDMoVZTwqK67k/pxEf0ze/bGoCRWKXfwBPpMVLbUvuMGJAQOs bW3Q6ETHiEF6nnF5VxGa2gowBZF9znLupEehvPXZSdiI5S5O0wH90BwE4RTqR+A= X-Google-Smtp-Source: AGHT+IES5ARbziOtU0omIM62ldJV61HnJflISF54CoCezeAWh0dUBTsAEufgLAJHedaFd0waldCY0w== X-Received: by 2002:a17:90a:d306:b0:2a2:8065:899f with SMTP id p6-20020a17090ad30600b002a28065899fmr4798578pju.41.1713063589971; Sat, 13 Apr 2024 19:59:49 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([139.177.225.246]) by smtp.gmail.com with ESMTPSA id cx15-20020a17090afd8f00b002a219f8079fsm4799913pjb.33.2024.04.13.19.59.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 13 Apr 2024 19:59:49 -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, 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 v2 3/3] RISC-V: Select ACPI PPTT drivers Date: Sun, 14 Apr 2024 10:58:26 +0800 Message-Id: <20240414025826.64025-3-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240414025826.64025-1-cuiyunhui@bytedance.com> References: <20240414025826.64025-1-cuiyunhui@bytedance.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240413_195951_275536_BC7841BC X-CRM114-Status: UNSURE ( 7.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 6d64888134ba..5d73fcaf9136 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