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: 788996 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 5284F17BA8 for ; Sun, 14 Apr 2024 02:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713063580; cv=none; b=f/2TJTyP0pDmXTqjj8hjRPu/rJcfIwdbzi/JpIpTNoNLgejP/JqNDWvY0aUk/UZTKIPhbi16AoW++lbZwGlwxWvh09v/xYVgI9WRR4St2gXStWgkGMQygm1x8p3U2f5SA0cUlzexPDe6MT0fI09NFgwBpWqAXV7UEhssytANie8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713063580; c=relaxed/simple; bh=n36euKbqIUH9mEQGupSkNUxESKc9mvK/u+joVsfYJnE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=MvTMvu9AHQUz5fWoIT2wh4AyQfaUWH1pl+t5V7XuwLVyzrHCUPIuJKrEyGjO0ILf51vmYuaRKFUoozelniKioIWC2Owiy8aIHdUp41Ig56L5VsTOLT/Sxib4B+lOhmyehBl+6ozMQWCQlGQ9pK3vZ8rvJyYbGYH0nGrshaRTjak= 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=UhDvYiAq; arc=none smtp.client-ip=209.85.214.177 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="UhDvYiAq" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e4266673bbso17656435ad.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=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=PQZbXYtBh7IQ8zFAgTStWmYnvk6O15njdv6RlNb8FnM=; b=UhDvYiAqdHYP+/0g2Q/zaRuHNN+XPG2ubNofs0VPEoHr5w62078lFkPsSVGIZPkg5/ pYyr4H7zCuiVQ9Pxu5zp9KmJMS3/HI5BNpVsoZP9GdeNaMw9YuNzEJfLTSR6OFKncVG5 +xlu5s0IRE9uliVo0jGnFGN08ZDENawluMoEQ/dJylgP5bTTENKzlIhcjX/y+jrLIP+W aEdlQsjz8GbyFNmWAempiKPvbDShVus2oUoyn2zI+kfKXrVeo22ofW6kj5zs/9C2ovLn k/cSBjWugBNWWjcv4Irx/gcfR4TP6/4u2YsXaxyvyRq0jMrl1Spytl4abRvmvwApCDZM a4HA== 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=YmylMD8kYj3YzOTwG8RDIUChcd9Phstg8yIMk6R7bF6GMOroJXS8D1n7B2CnHHXKNi FOO5TRtpqN6W/lFMo7fYwQ3bpJ62nmvWaKRUibfdCNuPd1fXf6HaSxi+KOmqL3NStlMU z+brw0RaumL/zj+Zh7b0RrFnBoXR+0CQ6hRBgaTATHTMLCBX/fvQcw9PFaeNEoMJqhfC E/u3++3adW4PMvNxCF2mid+xTzMjg4ZiQ2yjELw0Rok4gKxawKm1XjYaA42AO7Z0fvrI 5hxyDzYoiUxDB7xV4tYeblmM+WEEpFnYLiIrTz1MgpbdEqVAkTmWhxob9nXFeHUECfqU QVSg== X-Forwarded-Encrypted: i=1; AJvYcCXs95StfThq36umj8vc7MsOnRPJrrRfYXg5Ysssj/5sLpBrGwtWNVO+do2zcR7VI15h+BJkUU22CxD3RJHwW9QkgtDli4VSlpIkMw== X-Gm-Message-State: AOJu0YyknMGuMsJoOwOSFDZKnvN3NRxpXI9RNakO6pka+ZZVky4HdW8n qV7XuTnhNMs8upl3N5/vBsx+hBXuG3QF1UVSDdUCapwY76YGqcyHjzTZ/BAvBcQ= 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) Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- 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: 788815 Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.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 127A118C3D for ; Sun, 14 Apr 2024 02:59:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713063586; cv=none; b=C4M+MLjrboPf7fx8Oe5C3IjQSlp93yM44V3E7vUD2cM10Onkxw2e31XKgjUCUQLswSLAzMQH47ZfIccmm+OkVm03Ibh0LXM7BWoHZZKjsFJW/5VteYTjs6E5U7aeZFSQcFlNrDfvgr0ISFDmtgbl4UUK1d52dxrRBGzUAWfaA7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713063586; c=relaxed/simple; bh=GNxwO8FiM91HhPodNEqh1grX1c2NbQXpFfur+digntU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Yfwl/mmam5CpTlyc/4GlL8jW9+ltH3gsykmjnM6e6Qlhvw5m6Y5NTQS9Av5teKxcHB0h8v5bYyW9d+V6uAiG93fnW4H3tb2JOokKcGyCjcniEvCQ5KhhabBjzsVTHmjocg7YZLmjF7L5y+NrFJequ+KgP8EQT+GY7DOo/452GME= 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=IK2OiGAN; arc=none smtp.client-ip=209.85.215.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="IK2OiGAN" Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-5f415fd71f8so1696400a12.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=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=a+iJ/bWcbs5TbNYkdodB+bg4kp9o+X2TePK5VotNZ5U=; b=IK2OiGAN6NQbyDG1JvzjtEYJ79zVP7XjJeqSP4Xko8J++mC73Vivgs2R8QkUJ+BITx LGNqPcl85iDceypbrSZ7XaFn7m1RzhkFEbZDHEzt4/1/dF3IbCtrN+Vx4g5z9AiuPvU2 M1+OFXpee1cYSVEoQqU2E0c909ylfOMGS9nfNsXTkOBjTOAE5mauGFup1tahk88rSIji TGqqImmeRIjrOpHtSq5TXofa8mWaJqZV/+zJ1vUTIfbfGn6YVQWTgsI8FCBBmpoFkNgH XlrRDEAbOHlLDdf3EqDICDoj93UAC7dYq//CyqP5aIvmCPeGd7aSUSQp8lubCZ7ODnrg JgRQ== 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=Ky+BgSmu2GxJSgV+tsFBFUjREkhTpxvs3j0FQrlfpnzFXRZ8buyLj2kapFrNhtsA6F ZiMMD5sSbFhpIQyImjkDMX6wCUBSoAm4gCAHPLEV1lUXoAmAakT2UYcIYMw4P/F+Q1vn ta7g85dF+1qS79WrPBVw6gktlWGvnFNm1Ty65AarwVmWWc9iht3usugV6rGfZcNrUFc4 c1nXOwMQpjD4/Z4HsluNMFmB50UyeKs5kN3Y+vYEdYT/m7opFvXnXBwpT60U4KZ7nc68 2GTMmYWYViTQIUrXOJl/rg26jfBqd0q9+gw/7rR6c9D4jabCGzRWhtMcZK6IG4cH+hQy wNtA== X-Forwarded-Encrypted: i=1; AJvYcCXhBaU6muGA2aYQ7ag0qnPlZCCOAFhzHXdNTFqzAGvYo1biUCuusTaXgaIoW5ZWwBjqs9gOF5bG9mq9J/WQvwgmBqOO/4Zyu1KM2Q== X-Gm-Message-State: AOJu0YyUGg6YqcarGNlWhtR3BfLkTMJvJoVJwz38O6qIs8ZwiwjMHBKa bD+V8k0ajm6TSPQES2u6lA6B3p7/IFU5iBOrq69+aL5EcNNwjaDMWbOj1lFrdG4= 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> 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 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: 788995 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 997991BF27 for ; Sun, 14 Apr 2024 02:59:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713063591; cv=none; b=aBxZUc0flWYGGYRGsY5D/g0msc7dBIuiT0x24jvYlfJlLSwylUslG/Vzr4YZyPIrIBOzeBQXUGNSBMaXea/k7IDsFsS3JiHRkxBfL+BDy/wIZ3sA2DnFXeeL0cL/s9u5MOYPMVdtRiA7LjjPSrAsagEcxcDjL/f6W8PXxTr2C9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713063591; c=relaxed/simple; bh=74/j8ENughgKXArfiTJjMj2qv/FhTXWLGElJJX5xuq8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JYGIOoldSGMXUcVAKCeFfvKolyNAwb28HFhx10gtozNTKwaDIZAgPE1iEJufLH4VUVsmIy9LJMjgFE54dLsubObEzv0IFXy0Jp5ENwCyQacvFsrjZ33o9s7JwdQPOyuJxDvzqj+aAEBXn+feh9IVmq8giYX8xz8wwI0G/CJ709g= 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=gx4hC6tT; arc=none smtp.client-ip=209.85.210.176 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="gx4hC6tT" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6ed11782727so1788525b3a.1 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=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=hheiXqV+1wPbN2r8XTJ5OPePJHFHtIdLdr/kVMTR0TE=; b=gx4hC6tT3bhKRz1xEPhKSViTnx1nOQB21g5NfvSI2EQm3xDR7vm9pD8ydWsACFS9gn XnEQ//Y/uct6CskUejHsQMjsynCG6QewjfnK/hvaVB7UOrcYjKca5NEDuwX+OhVnKF6G v5U8RrrMxs6bJzkTD5ryfKu5l1AkZRRZFlsN1p9y7f8btWqaZFvsksPOt5OQXVbNoVUm cKIoA7yZIclUu4jP2+MEHeABg9XjPLtyExml98suZJvbX7PXr/sPlY078cPqSpNB4ocN sUQJhO98zQJmkjMDVeJRW0W5jI2q5yN7sz0uOri1biHtPsek/CUwhfjsbIii2zFndTo0 2U9w== 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=LRZn6spBOstsSr1gPL5vcboXcR6itgdaoz3XVkqzlYJQa23BfsPCgYthlobGprnU6w 8y2nG7IUitUE8RHbrHjQiwbv+0isYShOBjR47Nj1mNa9FVu+neotV5xJvP70vGV9Iw50 u6ZIiF7n+k2rLfdkAOl5heVYcJ2v1+1Vp0UpaArK3YIsd62i7YfgaLBvXMIvSkffBGU9 ffuxovKJB4Qsa2OZA1AihQpGBWQEOMS/houVcrA5qwno0UYqxq3xX8JdP4/Nfzz36U4U PI4AX5CnS0AJxJSg1dk0suQSy6u41Rh0/9k6mFs8+31QNDiDD40DpSeDa+dUs7NqET6U zdxQ== X-Forwarded-Encrypted: i=1; AJvYcCWC5wH7K6kAuyA4ekJ20wn2eqk70DQZXAKMbXyiWwfincNKBumbxah6Fd0yQzrbPvgxU1mCmNkTTF9Tdcz7usQYux7FDBIW9dj7sw== X-Gm-Message-State: AOJu0YxFPMuMdyw1h/3e93swksHKE1NTepRwrq9ozSEPSTH72bViOYeu 5IlNiVql2bo7eQoSMoXIkydgpUuvkKE/jd+aNTKRkiXtLC1/QCEYAmF43zPaFCo= 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> 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 --- 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