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: 13634092 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (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 966D64F896 for ; Thu, 18 Apr 2024 03:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713411852; cv=none; b=Aos4zVRDJQgApm87UD2L288YeJQ4Tk0CjJdEgfz9JmXYA4IfPkGCo5y7+ig6x4nWIshDZpr7Z62LJ/V/xkRk37dUSwDE/KpPUT6ClPLKhfCKJWDdz8QAFQ22CMI9pkmG/ih841SR4uvjsWX797hZP2lTAgX/0r6mGYGF111KEOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713411852; c=relaxed/simple; bh=f1DDzJv3xHeLtz/8Uh38H6uqD2mqnmTd8LGL7fsQk2Q=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ruhqvG4bcR4DG5XLpw7F7dXQoLvq084nAnR9lgQFlAT/s1YUTzOIuL9eJikWe5g1klIz0MvOWZ+9lnLGqxvVszsSAOdMnvzYLYu1kVuISLnyEX2CWOAWCUPZ8GVH4qF3lZKiS/SphfyN9fJg+Y1xxAQLVTvlFKlZbraQVF2Ehtg= 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=Y2pDslNs; arc=none smtp.client-ip=209.85.215.179 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="Y2pDslNs" Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5dca1efad59so263385a12.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=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=Y2pDslNs5o41NGzmdJJe6es0UHYGtMsHBXO3sHQGXG8g9WcEp+5HSi0l69Bar+p1q+ lP+bMKdv6Jl17qPwyG7D7pMcFYIKTgJYUjqmGjoSbPS08i/MmXwcXGL7Ytfo287kX+md JvuRg8LdUZQfaldR+h9tGT16aqxuhrpA71ZP/oWayGANBxokw60UmgNux2s0JB6FXnuk qScbX6hEOOpT25+0aTjxeQ8OPh0ao+RWpkSkGnvKmG3aQbsmLCPqQEXqyBpvQDfghCUr v23phpV+DazBqW/HYVq9taJGapXxvaHh7JZToQkw8MIBZ7h/mgyrioL2wbM+D5CYxgqX Ae7Q== 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=ZiAB8D/43PtkGXYRG5K2HZ0u9qtEzlQfOABBu7nSSHAgTwTVElnoXkXVwIc7XzloVn TAQtXtbxbbz5172HK/++mvWt/wqX1VvAnKzw4dPryg7knFzM1VrYCICbOMRXWi7htQpH LopvUECuCEU2h9GRkl3QLIUOVGlxTfNqiNviFh1SHCnUspw89lxCNGN/XIJ92AejSyNj ay+RDQX2UnXqChZOnSr/dHXh7KpvCfOFm1jqmAEejwRr+RgRe3BVSYBkTr+DqchNT11Q mOrSXJq5Yj7/iFfx0b887qTAi0+MHKc9nzQsqBVAfbaLt4kCoz5ivVVI6DDbdz0rYqzF 52lg== X-Forwarded-Encrypted: i=1; AJvYcCWcwDzf7DhcJj25B7gWeI0wIw2iS+1ZMHs8Phe6u6FcyPRyJbwXI0mcGgZttmBNnLS+7QT9BGI3VDrC3cWeRZHlEcYq1FSlOexD/A== X-Gm-Message-State: AOJu0Yz8AnA1ASXbtnPbr4dP0plXUWdi4wZEfPHc1frlEDcryEy2RSud degG9nLSbalJx3fb7X4qXXpPB5s0tNt/N822Ylv/bJWKE+8ZpoB/8J450s1JYTc= 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) 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: 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: 13634093 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 158C150A73 for ; Thu, 18 Apr 2024 03:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713411858; cv=none; b=K+lXTVysGgT4qa/lEsmI0D2Z6wNGV3JtSZHLOFktPp4iLN3XQ8znHWc9Ts4Oo0sVfwHsguQvUpsGNlC7XYc+ZPixW+f8IcqjMhL/6NgfC+W2NmBZKH7zNyZkIjQyqNiswgkPL0buIZHFYm+/grJz9xv6COa30Nwm1Zl44a6v0rY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713411858; c=relaxed/simple; bh=W/8ji5MqM5eWeh/ADTB3VySHgvKL73pmYr0YTKV3mAo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Szc9ZW3qYCVrY2zAu8r7iRJiUitGgIhsEEIvMxyzAUFofI/VEMbdmr5wyeYewPKhFI2G0MzG43E7gXu4ip76FQkeBhZmCD8kWuuGef3YuY6UA1XOxmNzpOZXw/jc/lo5Z0v2lu9OtREOTQhgl2n3Ss2YQf9FSc4ko0J+gK09qpo= 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=jDGnFXiA; arc=none smtp.client-ip=209.85.214.181 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="jDGnFXiA" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1e36b7e7dd2so3791525ad.1 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=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=uV+tTK/O3Cf3pGvDZokWea7cMMg5t3YML7P6RO2qmfM=; b=jDGnFXiAjSIGsWMkpozT3wduiTqiyX+/2g0e/r5chl3mGBKG8UEvWNSD/dpy+mP48l OIJ71uB0n9nV43AkngZjTgJcQKkKFhqswcdqTtTX7lEVmn1DPQ5OrkxfRoi26D0wRZZG mcJByuGICFeGmw1nB5jK0Pw9pPpLURcU+jG5YHWwIsADZ1nlCOu8xu+T7cub21gfnwS+ txJoQ+oVRb3a8qz5ta8ab0EMTR0ZLK/qHMwywkKI7upiYKQcJcxvUYn66m0cqs27OJD7 l9crynsxN1iQ3+SDmisK7sgSrLezf1IEBwASXT6Ah54RNCGjXp44C1Q3L/Yiqfmhgvcd ZzWQ== 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=n81r0RDW1wZojgm7OS/gR9bHz8XX+HVk3fDrSSidU2t33s+BsQhB/KgZ67qsA3hjea v6wKb7h9Cm+qbPivjkmwVF9fgMiFh8qCg37hZOzCdWwMwH1pEzfzLpuHpuUvtqIQvQRA wHMfX1m13sWQUXGQLc2ugJYMEo7cpcZFMmNVyJDba3iV41D8i4DNspywXlTomuNqHqnb 1jTgKfxj7u1yt3hFYXocRTePPuKasorvtya/NgmLX1zU/yfAyYTFdBKQIHF9wyw+evKi eVg8VQrDVSxoRk1VklCNXOeP1U5fEsNa7Ghn69HTqcizC9sk6YUERz+nUs4UpDZZOXjd /YvQ== X-Forwarded-Encrypted: i=1; AJvYcCVaAhFVZPOBoutpOI+MwxriqnMRhYopf6HtQnlYu0JdTJuGm5Pb6TCYtLbYoxlSjUJISQl1+C1x7cZdg/G0fd2n/JRDIihM88zCbA== X-Gm-Message-State: AOJu0YzeZQXaErd/ESRp8Q+8jLg6jdbkw6VUpW1nmK5CoVnaTmYyQfEG SFeMMLbSP3pT9iUMU5iigEtQcuKpgvvTTS58swACfoumAxLQKxE0IRXoabNFPJM= 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> 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 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: 13634094 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (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 F391453E11 for ; Thu, 18 Apr 2024 03:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713411866; cv=none; b=QXfHGBf0J/yJNU2Z6k6FAh4Av08Ge90vKvnoAnMVLaV/9MVQRa22HhOpFGVo8IP+E4zC6Z4b/WTAuNoy3CcOh0V931l2rCBYSXBs177m9Y3d72CWDE/zZzzdxhggtl6k1IT0AzQpo75yB0mMqPaZ+enEX4tOQt9eE7EaD49YeDo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713411866; c=relaxed/simple; bh=QNVH3MIBJcQmxrWe2ac9gxarQYaj//Q6x262C7JK6dg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XQ40x6vdvMtN3BXWJ1qkLgjuJNgjQW55/t8a+qbgxQAWrvvBCSZiNNVq5OdLYsei6SXebZGsPogfxTgHjtLJXsCeIM8VJoYmzH1LictVUo+cs1odRRDdFherjtIbweHY/3+hM6dtggFLh4jW4L50mgBVKe+WCkfwtowD7jyjsjw= 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=BKnvbXR3; arc=none smtp.client-ip=209.85.215.172 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="BKnvbXR3" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-5e4f79007ffso241551a12.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=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=bJMTHk2ffl+E4VuUN8SIjJ1xv6FPsnu6lwF/hE1PNxY=; b=BKnvbXR3CRK7oIzwDQaqPgTamslDw9XFjEk1hkb9FUZ3jJA4dGbctHo57DC32AMi5q CxAoI+D7L0SKwtZ7m2YiaV7ahkhl/7IgUGraJmBSYhER/WEJlOSmhjmi1JiUEsd8vkMt OsFt2wQ6KjdiWBXs7cP20KOdS002krRXVv4dgZDOzBAEpnW5Ayq7cZyyCHmxlFa6Vp3Y ICH4b61h/KdlXNdZAjxWZ+lL2Kct5J0hpF3kkIb3s20kcIT6ILvi6DMdnqI9xENCvZpG pwlAjRUHpWICl6YjXSwFF5JZhmWiTdWOEnnZwnmKlGLSf4TMTPaLOLiEk8duQWv1Lag3 Epbw== 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=gD4nQ8j16G6kJTacT94h6g66FQPrZ8n3tZdIsnh9Mg4kdySv0by4vSlBSGkijpSxGt uFmrhmKr80wP9zV/7vjluCTQRbSjQnF28uPw72A9GeWuxxp2UvWzEGHfA1e77GGGOSAM ujE50hSyigmLp3dQ3H+sdcjjCTOmiQxKde7qifTsApbfnqlxJPbuBo9tIb93hpL7IqVa WaHWOH0Y6XQAtxejlaX9mPAYRKC6IJNlwhsWcrRtqduSl3iENTgs0+CF8MI0S0yej8a3 sTppdPLDfUEs/LKk16xQLovdmXC1JdZiiwy4dgXoq7r8o5GdK9dn4c7792i4mKTxdoC5 2s1g== X-Forwarded-Encrypted: i=1; AJvYcCXwvDjY+uTOq+ezCapc1yMQKvERusLdJvMjorGQCmAi+12EvOAPgzOVyBA1qd47hJ57oQCWq43aXgUxmIbpPMCa+GLOcCFz9W8jCA== X-Gm-Message-State: AOJu0Yzzp5IRGebjEypry77EzWBBBHjPO2rBcyARiiYBfbOKE/Wik/Nr xXBur1nIAFNwCVd2pV8doyDIrq9Pk6KKwLYY4/YeqV6GXAocsoUDxZLVO7Soax4= 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> 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 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