From patchwork Tue Apr 16 03:14:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 789383 Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 CA85F4C7E for ; Tue, 16 Apr 2024 03:14:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713237291; cv=none; b=tzNvhHcsUEiReULx+ppC9y5QG2U/+tO8GhByPkYgeu6bPm9LqQA5skph7Nw1zRidLPrH9IGZ4au5qNFMRBtXohJCQokUHz3p5EGEQvpW3F3UbTJTfhm9ZoDWBzdD7iAImsBElevE5CweC0WmgSRfKIekLQuX5pILqsOhQ0xWP0c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713237291; c=relaxed/simple; bh=n36euKbqIUH9mEQGupSkNUxESKc9mvK/u+joVsfYJnE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Fab85h2I4IkJZlX50ViWC/SEWvOc4W78iOOMfV44x9VQC0kaJzFfFesz+o6CzVZR/svf5DYOnGjyTLc4gc2rtW5LPLM/L3rPraTyo/zSwAsJtA9aTO4DWb8MUkvGjrMZ6eWpRdgQORy5i9QjbkWa+PZ0DvjbFLzuq2Fa6QiE+rU= 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=K3oBTXpQ; arc=none smtp.client-ip=209.85.210.48 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="K3oBTXpQ" Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-6eb77e56b20so1632862a34.3 for ; Mon, 15 Apr 2024 20:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713237289; x=1713842089; 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=K3oBTXpQfnc0YOmVSJKOFzcEs/7dB2z5UafrSyOVnvD+7ZK94Cxbk9GigIxCob3g86 uwCpP8RtRnS52Bh3wPiXd+MLB6CmEcHK5bSFdROQIjKgC/+QzduJw+YGF+EG4sSkiqBv R2klRdqKWI8N0W60ZFoDSjUeEtEgl1A/vj9ZjYMeXPWchGCm8cIo8KnDIsCx+G6g0dK0 XmWBNiU9VHGE32N9S/FBxykmYGpNlxED3xSMyPuRAO+A2kLku1ZBD/W83CrbOb3awaZh ax/Yzs/qlBoQpOUaVt9snhrqizjV0WZsnieIC2ja97HceFY/dIQMDBejPGms0/KX+V+W FTOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713237289; x=1713842089; 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=NkhECqf2AqwEpOygbV5TBMYMHARphY+S4WoBh3sMnkjSBKs5jAidrHfHjejVKoHbOn sI9AAkFJ8bUB28R5Vq0/LOEmZ4wGZqJ+4ezXxLW81IjkY52kH/FgJkL1yLmriyau4TdN Cct6Pea4rUdJEb8pID7TPYrfS2zG2gZAt13MGNrxnkERLGkjEnG/M6HbQurC02wwU1Ok NrnROppobUPSEUAhjwBmfQnXi+Aa+OHYB6C1tJIQtNstx2LpeD9BHLRZdxtACNLDGCSJ 0gMlF0ximN2JSHzw3SBF1T9fn7j/Yl2X/hfJw2xTZ2U2miF98s/YUQTB5lFB+VbXTdio Y41A== X-Forwarded-Encrypted: i=1; AJvYcCVnXvzOCjV/QwTORsik2zyuM+jREuasKl5L58XV4HQuhSCgQHrBfUSO3DtTsHx4znSGHoEKOQ1WnBkVk4lptfXBqbbfZjzaOQaEKA== X-Gm-Message-State: AOJu0YxdlKXc2aXv9gdNj8V3vYONqZhqJ2UO1IQ8/uxSHp/e619XbzP/ D00lKemLAYS3f1YkOjMEqLGuaL2sM8fg7chXW0uB29cQBaAr/x0L+YKS3J/RJYk= X-Google-Smtp-Source: AGHT+IEUEhPIFbi25ZykOAC+pbd6o9LQdaAFbDsNVQBq2JuTsulcC5uS7XAD4urvJzqQy3HPwtT6fQ== X-Received: by 2002:a05:6870:c1cf:b0:22a:bdd7:7b3b with SMTP id i15-20020a056870c1cf00b0022abdd77b3bmr14102111oad.11.1713237288784; Mon, 15 Apr 2024 20:14:48 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.12]) by smtp.gmail.com with ESMTPSA id d20-20020aa78694000000b006e6adfb8897sm7907983pfo.156.2024.04.15.20.14.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 Apr 2024 20:14:48 -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 v3 1/3] riscv: cacheinfo: remove the useless parameter (node) of ci_leaf_init() Date: Tue, 16 Apr 2024 11:14:36 +0800 Message-Id: <20240416031438.7637-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 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 Tue Apr 16 03:14:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 789952 Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (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 777491AACC for ; Tue, 16 Apr 2024 03:14:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713237297; cv=none; b=FSIK6IFNbhEYZobhkIEpLFpvZWTrd3c1dQSWyZ/uApJ4evQgpTRcfQ/wkTToasnvWNBd3MXN0yZN3FwvM68wR/zh3uB22Z9rosWINHPuZ5vgIb7L14Uu3DVlrxc2eyMEtFGSYlZ0er0xTf0Bg1N9f5X8eKt4hl4gLDa3QKtwCKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713237297; c=relaxed/simple; bh=73Ooj+OaJJIoBwEkContTKxHyybH+bNX3xJA/ldJcL0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gzjlNlzeIKQ/yKOxBV+UnqE5TH0YmBCDJAnQeQ58nI7JlqJap2wo6m5YtYc81TeLABwWmG9rUM0FcelEUVrjWe7wRigFqLWGazsGFpMPrmNxJixcp9hmLUGCy6Uqq+bV7DmcFzLF3fuH1eAlxkRi4wxsONbEnfRk1QMJNMaQjRs= 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=UCOOCnh+; arc=none smtp.client-ip=209.85.167.169 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="UCOOCnh+" Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3c70b652154so1136197b6e.2 for ; Mon, 15 Apr 2024 20:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713237294; x=1713842094; 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=9yve68TeIN/f8pyzLtfbyGcp16m/kz9ccR5yLCEIe7Y=; b=UCOOCnh+dsL7jY9IXyUpbhZA/SsvalP0hXaB/QD8bBU3ooMgftD2ByoAj3Lys4ZXvD aEg2RCI2UQCExpRDRcAKCZUe4r3sWWV5aXhksFjefoIPWgHKyZ7rQTiTED48cZL+I3S8 /tSRS+Aj50yIArYYjrOplBcCPOQwRZ8GxvKyuC74PeVx+64M2R7LcgBbQSxhUuJKyqEd NT2/bXyt/50uYWWm6RT5620BCA3T23C0z6+Y4DATdmFq19qK/qpH/wR5yrvjxJcX94cC N9yzbMVbw5ICwZjurG88OaEzbvs71ocfheqXGhg3Vl0fWdQ/oQG4oAJvGRcgKedvKc0S JfNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713237294; x=1713842094; 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=9yve68TeIN/f8pyzLtfbyGcp16m/kz9ccR5yLCEIe7Y=; b=hWI4363vRNXMKmwHtgxmAcrZ+TiYv0ZqmteWFZ9Ph6JnjqsxwyMPtW3Nq4O+O+2Rrs 7KsFCTe1KvAdfx9/7yDJI6iWBO50d0cRshjQBWuRf5Ek/oYjjcCZJOL7RDGGef9upAiG PbHph2Dvtbt98DIG63/plMeT6yVvN7cB4kNQ3US4jvclFr54lkmaXwVja7WHfQ8rzHhU 6P1/6fRlLZ7att8pzQECbIhPE7Yc1Ptal1mzUpvXoE/cXG55F/LTG3uZJIR7Nsv8nkiu Cehf4mPcMS8CjCvZN6CXNMBsvyfmuHYbCh9agGVD8hiaZGdXeTtbpQtmMwVaxfxBdfSJ 3CTA== X-Forwarded-Encrypted: i=1; AJvYcCUM++/+308wXsjsr0vI3d9b2LMNhGSum7IJLJNOmLqGhHbTvuxw6rEVqky48NiuW5E6KG84+id65kshlHBIkl1njNifqOOiu6+pAw== X-Gm-Message-State: AOJu0Yz1NvOpLFY4UYoGZ/NMaTmWpYvSTCujEXL9ofCSHtvBwhzRzLvz pWMPKc7/0Oqq8bIEOPE9iBZGKXOqvQnrMivBKEl7qseFsIT0jGPxJWxABwJybb4= X-Google-Smtp-Source: AGHT+IEeADcSOG5m5cSI0ix14SxkbexoEWR7Z85N/k76lNUya9yj2CgCsg1obRQTztWOVlClkCQkEQ== X-Received: by 2002:a05:6808:6044:b0:3c5:fb09:aeea with SMTP id dd4-20020a056808604400b003c5fb09aeeamr11353481oib.35.1713237294624; Mon, 15 Apr 2024 20:14:54 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.12]) by smtp.gmail.com with ESMTPSA id d20-20020aa78694000000b006e6adfb8897sm7907983pfo.156.2024.04.15.20.14.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 Apr 2024 20:14:54 -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 v3 2/3] riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT Date: Tue, 16 Apr 2024 11:14:37 +0800 Message-Id: <20240416031438.7637-2-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240416031438.7637-1-cuiyunhui@bytedance.com> References: <20240416031438.7637-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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 30a6878287ad..dc5fb70362f1 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,25 @@ 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; + + 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 Tue Apr 16 03:14:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunhui Cui X-Patchwork-Id: 789382 Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (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 4EAAC22075 for ; Tue, 16 Apr 2024 03:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713237302; cv=none; b=iDiFfyjUlrsqLVNeuQx/N64MY01mgq5OGLipodkDDrtNlEsSHcIzicOy1aUxUoZQlrXVnXzb+N/ilpfdUys4iQcGOTyyofiSN57suMNNRso1vp4gqhvNOr0msr15YQJdO8jJePeuIASx4yLM/49P4aLKOEqad7JqCjO+yyF6jKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713237302; c=relaxed/simple; bh=74/j8ENughgKXArfiTJjMj2qv/FhTXWLGElJJX5xuq8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A7rQQtVx3cfbIEnoodpp6GQ5vCu46CGRc7LUKE5hXbiUscCo/mL5zK40Yx6wEg4yywTAxicGhVuMCTZGHVJ0W+VpZTRGhTf1/afpTqJc0gZriDHjjV1g3I6u3OSHxZj9Cx2tsTZ44UGf9JvIsblSPvR9sopdCE0lpLm4bvxnDoc= 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=POaODImO; arc=none smtp.client-ip=209.85.160.42 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="POaODImO" Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-2331bef249eso1726569fac.3 for ; Mon, 15 Apr 2024 20:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1713237300; x=1713842100; 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=POaODImOE0GrDhMkCrPC5b1c4UeZhlUiLUyBc69bAN153de2BSJpaBjAJsiN7gLb0+ JpOAJSyHB+qPQxST5KrPf0UGSDMckVHBUmc9EMq06Meat5WOuD1eHDFb6Nhj9LV3Quqp dugLoXjofPWEz+6pmL0jqFgR94aJId6PXKfEXLezqi3n+y7LRhqXAuDurXp8v9+tYVRh tET2GyVPDQOhGwd+QPgkM2dnGI/+rbDTeZZa5Ebk7wa57aVZueKw5u9IXcOGeKho5qgq xnu+0mr4WurKgAF9GLNOL1xJgCzY9HyzAIPFeT0rlJU50k4n+YZ56rAjSfwAsdrtWrmb xlwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713237300; x=1713842100; 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=mScpeRvhuqNfectOnV9LSEMxtqdUqxVBW7KxiHq9r+FUYmZHiz/c95B2DmII9jYqhI nVOP047biMal94XXiunk+4ADPNYCO07lO9EifyDR1OAMbY4uamwjItT3BPXhCCOyRbgN wXgMegY7iWsnBZTl0KrcViaL73louXfvUkpE2kFyWlXlmTmQDV7t42GnUqQbsGfXWjvc yHrq/glqt61p1eiBq+EIvlw1uTSa1lGCOXlIMn/gEtKZ6IS2niZorOMABZsS5Gna9GnM us/4/F1gUZtYvqW54CSkG/CIM7tH9OG3EJLljeg2NUmdfjqBsuYK7h+pjrwfY0yeFBN6 Z/QQ== X-Forwarded-Encrypted: i=1; AJvYcCWVTNlB6ksspbl6CWFcwbsNkCdRK094b2RBLDr154rWx/eI45h6ajbgCSiqMws5wUTb8ap51mTR1zPYfktoFHDzwC++toalE5ZAAQ== X-Gm-Message-State: AOJu0Yzi1egt2baDLq6MKwi2zc3SaekVmE8clIRr4IXqJeYPTHn1H6nA 7zwMCRik8IckwBQWHAANVrLqhct5D1IICAyMyyNY03KMwVmSX6klNrHiU1DRLfJ5O1fREbWpoEo 7jf0= X-Google-Smtp-Source: AGHT+IGHqrx1cBNmqnGC6ynZDle54CpzgsuaxouCGoQwD7AV+L407iMBlKY6fL1a8Ib2gQlJQspleg== X-Received: by 2002:a05:6871:553:b0:22e:a970:a2ba with SMTP id t19-20020a056871055300b0022ea970a2bamr13356803oal.8.1713237300386; Mon, 15 Apr 2024 20:15:00 -0700 (PDT) Received: from L6YN4KR4K9.bytedance.net ([61.213.176.12]) by smtp.gmail.com with ESMTPSA id d20-20020aa78694000000b006e6adfb8897sm7907983pfo.156.2024.04.15.20.14.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 15 Apr 2024 20:15:00 -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 v3 3/3] RISC-V: Select ACPI PPTT drivers Date: Tue, 16 Apr 2024 11:14:38 +0800 Message-Id: <20240416031438.7637-3-cuiyunhui@bytedance.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20240416031438.7637-1-cuiyunhui@bytedance.com> References: <20240416031438.7637-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