From patchwork Thu Apr 18 03:43:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 13634095 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 39B2AC4345F for ; Thu, 18 Apr 2024 03:44:28 +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=CyxDcWI3uUvv//eYA8YaTnOjJeuS6+fQAAgwQo1Ag+0=; b=yxkm0SOHk95EAX +RlYIlgxQw7FG9diwYvP3xbk4fRVO3C225eK9M/KFxKfOZLQDJHrj3XqHiMzeDT3ZRCyyuEWtsUGy ZVz8kO0CRCx7FN83rTKQ8UK9JLVIwCXpROf/lQcJr6bfklxCqIhLTett149wDliPm0i1W/6lfW4lm 6N4r0nILA0Jc1Kz66CuFsSkX3K72X0frArIbBx4SRPSQSMjVxGwi6qLflUHGyZnOkAsmhntZzBoh0 3/7GOgjqXkcfewXOPsUfsvVXZ8wZ2pq26qkc54iY5hgc6HgJsmt5KrTLqEG6PdCQJi9ewlGXuvlw9 rcg2jLYbwrGWjASq8eoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxIh8-00000000okf-1cvm; Thu, 18 Apr 2024 03:44:18 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxIh5-00000000ojo-2Nhd for linux-riscv@lists.infradead.org; Thu, 18 Apr 2024 03:44:17 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6eff2be3b33so483651b3a.2 for ; Wed, 17 Apr 2024 20:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713411849; x=1714016649; 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=+aKuxY2Fk4OLcsa0CSr6w7+nYt28fnnuhVioZfggdrc=; b=fkvwTEPXFnMp7XpRvrsuYsY0Y5tCt7YgnD10u2XyIVLh11972yton7P6QLZko6zPaq OkmAA6v47oDr04JJrKPqoWmUn2GJv3iRt0bD+e+t2aOFHPck5ruAasfghnHbZzInfDPA rEBitJxb1Tv3jcuOjMf8CmDdzypjolKRkA+McnaAuDYv2JaaoXg2UryO4OVXDNI3E8C3 qiy18/AkW+F3GCAmmHVYgULX+Q3ELu3zn9ROXiBXgIKPPmkMxOaEuky26Z2WHdmoSZUr XlxSNnesG0NTG8PYshHUY9IsTRA1kWZk1kwCdfIFv4LDQdkA4VlKbBcJAx5amykpHXCj CrXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713411849; x=1714016649; 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=XB3CfRS7QWBzncUlaslDZ3uYv6Mj9Pau5BsLbOL3psYXeZbd4A1farB0rkdepN48K0 QyUaOsJ4TzAYVTG4WoOS17UQt1Nyhyu++/3lOQLFjhNf2ugN+g8dm+/TBbwvi5RLvbdg A6t+XYWH+xQu2rvfESd3PDEXr9X/cXw8TJ/eG63c7MuB5GIRhwhrBNYKs2c/HJF8NxeU e6wCtnvtGG5wLw7m+WIP4gyK2J3xOMqlwFZb8BHRvy+9vqIu2nZ+C1IN1Ap/On0YAMN+ R3sPU1KMeWMXlzg++YLMTkRxw+vnT3f87BXNFp8C1cuuXACauByI5Hdo6HfNSaXh6Dm6 hZng== X-Forwarded-Encrypted: i=1; AJvYcCW6t0cKK5wzXKwsZrau56gDsGKLFMGdbcwhPiqm+O7lzJ0pTEUau8vF1JtWMa+u5spaLlPa3TuEG6ixoH5hNcaIg11MRScKrufLlfltrTqA X-Gm-Message-State: AOJu0Ywx2sbD3OOz2KvBdGOJ4+XkwixWIAP5Eeo9GQjs4KBbqiVzlYEz BCXbZHIbY9AvtBaocd44aRXYoPp4KgV3ODsyHgDs2zGLWz5LJFTKildKhmKpZfk= X-Google-Smtp-Source: AGHT+IENnC+gIH2bbDka18v3JCTvqRUUTm8xhPk1GrdsMZSjMFsPl6ypgKPGxdD/ZPfFfCVnnmOTAQ== X-Received: by 2002:a05:6a21:184:b0:1a9:8834:ee7d with SMTP id le4-20020a056a21018400b001a98834ee7dmr1973589pzb.4.1713411848825; Wed, 17 Apr 2024 20:44:08 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.13]) by smtp.gmail.com with ESMTPSA id lb4-20020a170902fa4400b001e88a4ebeb2sm109880plb.152.2024.04.17.20.44.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Apr 2024 20:44:08 -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 v4 1/3] riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init() Date: Thu, 18 Apr 2024 11:43:28 +0800 Message-Id: <20240418034330.84721-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-20240417_204415_896071_F33EF5A1 X-CRM114-Status: UNSURE ( 8.45 ) 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 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: Conor Dooley --- 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 Apr 18 03:43:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 13634097 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 6FF72C05023 for ; Thu, 18 Apr 2024 03:44:34 +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=dU3gjRF5bEdGvRguJu1v0VGFZha6kcKg4C4a2UHXq0I=; b=O4lXYBBFHShaqp QfA8BkAzPiogaZoODFAD9GmC9DlHxP5nFZRehamE9NfyqUyPw5x0IPrTPXQvYnuoIhMbnlqj9ZoOg +b8On/Ma2XWjAjNatlSsPZBTkwq7+Euyw1DTFqgfQb9Ssmu301uD8VCt5cKnwPGPBQmY7aYKiFaL8 cVJFxCMp/ZiM79Q+7Wc+qIBcfoq2GwdVNqxzUlQ+0pqw1a0bVRPlU3L1pxoVielWKWDqdBeUHXLHA DLMkObxTBko+NWuAScFeLEPvAx3273dT317WA2eMpnNAfUs2/4av7I01mCKY69NnMPMwFxPbfr5aU bdoSYy/Hh3Ep0UcxxVTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxIhC-00000000olV-2IKC; Thu, 18 Apr 2024 03:44:22 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxIh7-00000000okH-0AiH for linux-riscv@lists.infradead.org; Thu, 18 Apr 2024 03:44:18 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1e5715a9ebdso3667025ad.2 for ; Wed, 17 Apr 2024 20:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713411856; x=1714016656; 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=uV+tTK/O3Cf3pGvDZokWea7cMMg5t3YML7P6RO2qmfM=; b=Rk3+bFF+00TrUaUzORCODvROQyq7z0/szZ+NtZZl+3GWfPeRXUgfL4ypLx5t1YP+bB Ama4k5kodRynIFKTCzR/lfhs3HMohFfy/sM/KOB56Zx8MXvMJLSVPLL+2exVQa+lYj6B Rqa+zIZvWEMFQHG+/6RF8YabYQclS44eNLqVu3Rhqjipz2RF4AVTkzNHpelAWb2jx/lz 89b+6zmCWIIAfILbcb0cqsZ6OUkKCchgF+vxduWkMuYWJsMS6bxdJqXHq2PD7etUwdbi cuCwAtmkL+FESNWjHwEhZcFvgoZiBT6fD3hmmFx32DXzxC1QyoR0afQZ8ehfI5mGzfkj mLKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713411856; x=1714016656; 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=uV+tTK/O3Cf3pGvDZokWea7cMMg5t3YML7P6RO2qmfM=; b=kQ/JvwBjN5Y8WWd1IZo1iZT7Woo86Qkf1z2eK4FvTWFaTJsAy3kvu05Pa3LWZXCkEZ c//C9qNtPQTJkXS8ZmVMTXe8I4zAAlmbtQWPm/Kxg1jj/KuGJBR91+pcFOKaSe/UotBO SPNnhlQY0z7C8HA+W3BEHrbXfzaFeTKMraTMElBonDAHECTSZ0vOVsItKbkkYb5NJY7T 9eiX1JS39dc3jqb9qs0Gh96sZ0hu0T9eE7r+D09t3Jdtr6zTeteujfFpDK9+2dRYmC/k /e6IYhS3lF+moxZ7THxJvUw11KCO50utkHQ7KR+tEXlhJSkMYNLSFQcYrhYMM0S1e9fL ijxA== X-Forwarded-Encrypted: i=1; AJvYcCW4r8h2t7CA1Hy0ERivUtFOzipFfH2j8apA9PKHfmYF8cM4nAnSYwKzWBSl46FDdj3IVaGF8gvKXM3s7nF9Rfn+Jd5H9wHgl1EFA6Vsv/CY X-Gm-Message-State: AOJu0YwMDZ7TvhBW7kytXTFpYppfpqfnqjxMeVac38J2ehe2iiJvLkU2 /XLvuQJMZsEUNOaeG51xRyx9VkqM3KzZYECzx74O1ZJuAnUGptRQx3tNTRpLLEMCh+xdmn8+7ub +TnE= X-Google-Smtp-Source: AGHT+IF8Ybd8h59QRpmrLTR1zcYkAknZUw68pJcmzna4XUaXYII2l5xPSDLL6d6AFTyAFaONPu4ZYw== X-Received: by 2002:a17:903:22c5:b0:1e3:cf2b:7151 with SMTP id y5-20020a17090322c500b001e3cf2b7151mr2011147plg.59.1713411856291; Wed, 17 Apr 2024 20:44:16 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.13]) by smtp.gmail.com with ESMTPSA id lb4-20020a170902fa4400b001e88a4ebeb2sm109880plb.152.2024.04.17.20.44.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Apr 2024 20:44:16 -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 v4 2/3] riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT Date: Thu, 18 Apr 2024 11:43:29 +0800 Message-Id: <20240418034330.84721-2-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240418034330.84721-1-cuiyunhui@bytedance.com> References: <20240418034330.84721-1-cuiyunhui@bytedance.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_204417_123061_DE4BAF0E X-CRM114-Status: GOOD ( 11.82 ) 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 Reviewed-by: Jeremy Linton Reviewed-by: Conor Dooley Reviewed-by: Sunil V L --- 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..e47a1e6bd3fe 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,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 Apr 18 03:43:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 13634096 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 91FDBC4345F for ; Thu, 18 Apr 2024 03:44:32 +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=aviPDN82IJfRpqxNlEoxWKYHtkXL7S4FyiN+NVmwHfI=; b=O7TkYv3EiKgEbz 5i8B2MIm7c2Nug6bPA4jZjY8B3BpBE7AU8VRSWFtFvrAIJvzRaYnRN7zfPg8/WU8N5Ai46MEqQuPq VuB+wVxKqi42p6AdTlx84YwQsEg2xeqv+/nVQK1WbX+UnPLt4e8gyV9bJBuzqV+c0gcz8qIfEKx3v m0vhaTKgDoCyP+iW/PMZU8X2RclS4G9Xv7mcXUDOK18wgH1C0NqMuV2IHtc+iUzh3UEXwHZ8Fkifg a69N68T0Gv6AvHTVT5NIlB9ffBZDgxHVtkqTcYaqSG6ykjwaOre/WEAIgqWVQrKtuxo0rt4uEvXRE DZFtHKh8c5yRTYa81eCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxIhI-00000000oow-2Y4E; Thu, 18 Apr 2024 03:44:28 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxIhF-00000000onL-1uxi for linux-riscv@lists.infradead.org; Thu, 18 Apr 2024 03:44:26 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5e4f79007ffso241550a12.2 for ; Wed, 17 Apr 2024 20:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713411864; x=1714016664; 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=bJMTHk2ffl+E4VuUN8SIjJ1xv6FPsnu6lwF/hE1PNxY=; b=koQlTZgsNTQkI1jjtV2KwAWaeN+aoaL6QKw+ls1dbzGFS8SBCSFWCXmZcnDKbiA+Yo c5id5Li/OZLwyFyOMJa6eTwXvXKdjlW2AGv5UXGSBVQpueyayPAit1l1mXNCX4pNgD1D JPEoXfKpNsVHTI6CjIbW45AWcK3mYr7p6FmPo9Pw0SHE1Qm0shTf/YRjx7qibwb8CQmb 3MfAehbNWmikkIdExG9Plxip3SPZgVMRZvW7/iAMwJ/FZ2w/DYQauymc8bVvDkE1ysYA 96oYlzdzlsYSKEEny8twepB0PW6+XBqCvopyYQ5xn+6/VYcE9LJFwXWJ+LEOX72+mRTx dBjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713411864; x=1714016664; 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=bJMTHk2ffl+E4VuUN8SIjJ1xv6FPsnu6lwF/hE1PNxY=; b=UlmjUTI9mpLu+bu9S3i4eG4ubkT5YusyfBvOV5zve6xgWHM6inWy307F/wD3UbsItK dbUQi72aktAYX/OS9S8Ns19nkdgaZJp7yEsILnkNo39IUKE1xLHcr9Jkb6Pv8YSuGuJF pThitN99Um6T5DwQR06jElX/cAjS5fhhiMO5f0ZafNJWmjlX3JqPJSBTw9ZSkKmflPYJ ZVtvUeOQR6QSlmghpgv0l0ffyD/dvMl6kJsYiRrpFdAux8cSEGtoX3ULrBi9iXZJDId4 DJVMr50igyp3TSuLI3ZeJxKuEMJGxGlZsKyakrm/eR/WqJmpc5822HDjKPKt82igfa84 c+Vg== X-Forwarded-Encrypted: i=1; AJvYcCXDmZ4mKG9TN4VB2+6B39Mawq8isIXPL1/8QWAlrh16YoNYE84JgSTHIdyOKtnorNbqLRB1kuOfIxa7uHbNBgtpYeWOaevvY3i7wBhFs+2y X-Gm-Message-State: AOJu0YyLb/Cl3MbL9Ug6OleMTxV9emlwUOyLrdTr2rWrIfgO+Vm0z0Hj 9nB6tFECNrL2fIdafvYHcafECRl/4Rrq7Xp3S+1epKnoD1cDpzq+NR/yM3ZNE2k= X-Google-Smtp-Source: AGHT+IGNfSaOuVzuIVb16fk0/zNgAN8yvRyFpld65Vh6hV1yYO9gxMq2J7SgUz5g6XQxK1IMaY0L7g== X-Received: by 2002:a05:6a21:398c:b0:1a7:4a23:69b5 with SMTP id ad12-20020a056a21398c00b001a74a2369b5mr2083909pzc.8.1713411864354; Wed, 17 Apr 2024 20:44:24 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.13]) by smtp.gmail.com with ESMTPSA id lb4-20020a170902fa4400b001e88a4ebeb2sm109880plb.152.2024.04.17.20.44.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Apr 2024 20:44:24 -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 v4 3/3] RISC-V: Select ACPI PPTT drivers Date: Thu, 18 Apr 2024 11:43:30 +0800 Message-Id: <20240418034330.84721-3-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240418034330.84721-1-cuiyunhui@bytedance.com> References: <20240418034330.84721-1-cuiyunhui@bytedance.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_204425_556725_22FF0A3B X-CRM114-Status: UNSURE ( 7.51 ) 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 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 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