From patchwork Thu Mar 7 08:47:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585180 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 A0570C48BF6 for ; Thu, 7 Mar 2024 08:34: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P+EwN4kFuyyb7Zf1tq+s3M1ILXH1LIE8XQlhJHkN9ME=; b=GyycSh0e9iw+Mx Rdt/LEZNBhBw/jIuI7CNw0HCTDtNQXLJTdSRd6zvAx1RHg0uFkws0kDNSTM926qQ7xTlRVfFCasCj AZkm253WFSEz0kWNWoxpi3SyH0qUWerxy4dE6EVz9Hxp3S/LmsCFfc8MxiarIgX4GzXndKOOajGSG nGdR/QdoAFbgm8B17rY0fZOLPEuokEPaT5uHvgKbd1eolzqUMd1H1EEHU5mfJig6S2BkyZGevhJmf +HEzdthLvYECzDm70AJov61J21M6KTIBopmIKeFw64cju0OIUmhfEN7GApN7wPCjcTmmrQUCdCl24 A8ASeBzE3UDf5HYtOSgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9DE-00000003e0s-0UN1; Thu, 07 Mar 2024 08:34:48 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9DB-00000003dzp-0jGX for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:34:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800486; x=1741336486; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vVb6RIIvOt4enB6/MzuWcA6dkAPHXShQ2Vxb7to1nk8=; b=gmMy1doeiLf/bohCn0JmPik8+HxLrqPIr48cMTerjyxxV/LzyO65Q3+v CVMUqxijcJypm4/DCpuiK9lXQ70pOhuJ9h50PkstneoZ9oYKtfz3AYOH5 tYbyomj5Zw4mzCroEh7M5kwmUN+zkqHQIIajduc5x3LcPLi1PWPpuQpr1 7lL16gFthcCFziyCIkQI9iBT8Mw+vQwkJ4Y2GzHHl96hS22EeE3XpcjAB 6y1o7CNJYYzaMW8M3hkkj3rax5+3i+gvXe2LMz3yt2jbNZGFC9BrjAazu 05R8dZvQ2cJudKDa2PN/NCych81ZNAYMcUPJz4QvzpbflV1qnqdjFZy1G Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600307" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600307" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:34:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699587" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:34:35 -0800 From: Haibo Xu To: Subject: [PATCH v2 1/6] ACPICA: SRAT: Add RISC-V RINTC affinity structure Date: Thu, 7 Mar 2024 16:47:53 +0800 Message-Id: <01b9c8a6d029b178f819616912a0ff8928b534a8.1709780590.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003445_271833_E0B21A92 X-CRM114-Status: GOOD ( 10.22 ) 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: , Cc: Alison Schofield , Jisheng Zhang , "Rafael J. Wysocki" , Dave Hansen , Conor Dooley , Guo Ren , Zong Li , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , Marc Zyngier , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Dan Williams , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org ACPICA commit 93caddbf2f620769052c59ec471f018281dc3a24 Add definition of RISC-V Interrupt Controller(RINTC) affinity structure which was approved by UEFI forum and will be part of next ACPI spec version(6.6). Link: https://github.com/acpica/acpica/commit/93caddbf Signed-off-by: Haibo Xu --- include/acpi/actbl3.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index c080d579a546..5202e3fc9b41 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -192,7 +192,8 @@ enum acpi_srat_type { ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */ ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */ - ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */ + ACPI_SRAT_TYPE_RINTC_AFFINITY = 7, /* ACPI 6.6 */ + ACPI_SRAT_TYPE_RESERVED = 8 /* 8 and greater are reserved */ }; /* @@ -296,6 +297,21 @@ struct acpi_srat_generic_affinity { #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */ #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */ +/* 7: RINTC Affinity (ACPI 6.6) */ + +struct acpi_srat_rintc_affinity { + struct acpi_subtable_header header; + u16 reserved; /* Reserved, must be zero */ + u32 proximity_domain; + u32 acpi_processor_uid; + u32 flags; + u32 clock_domain; +}; + +/* Flags for struct acpi_srat_rintc_affinity */ + +#define ACPI_SRAT_RINTC_ENABLED (1) /* 00: Use affinity structure */ + /******************************************************************************* * * STAO - Status Override Table (_STA override) - ACPI 6.0 From patchwork Thu Mar 7 08:47:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585181 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 6B4C2C54E49 for ; Thu, 7 Mar 2024 08:35:11 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ubm5l3KqAPQkR2ZzRAgKe19F61Bvts5M0TzQY0AjvDE=; b=fAZor2EbHjxahB QPzb2WS/yeYCJMrNezgnSK5lKRuiWSbNqQME1CxYmaaoeagE/thJWq2Jgoc477lGvDU5s2wNWTpyR GHpBqWx/02GF8cEO95R4Bp+aVtRvs+vt98t2DJZzO2FV31vBXrjvvMMzu+2j1ghZO/yQT7camEBPy esymi/kT366lQZuVBlFxGrzADbQozWb/mlDejUsN0h74DIpKyeVhrtDdNri5CR/zisP2wCjTJDCx+ H/Az7in9OTcTSKlc5O3z7vVldmOJNcl/aM0SCQBcOkMYdJexAWqX2J/FHtKHZLdSVT5UDTllSdj1i qpVeFL8kqXuydcpWXFJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9DY-00000003eCF-0aBg; Thu, 07 Mar 2024 08:35:08 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9DU-00000003e9B-0y9R for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:35:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800505; x=1741336505; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g4tiDkkSZnXc0ReWfyPmSD14iq7asegAk7ookJoxuww=; b=LnoKQd1Rpwpide0LjAdb5Ch2q7yq1PJKn5tbCC9IlO5bl9uUluMD4eYV 0OyBD3zgi8SUHYl4tnvowpBbL7eFLEZLHLPuTOdOsBXrfh4qrd5oL5ALH OJTSDGnRRD81hytECrztsjBMEOtSvkC6pLm278ffE3Pf7DULZ6vA349W8 qlpe/zQbnpaipf8K2sV7HUymmz3VLcLs+w95qBPe7zgNDTbwmUAF8GWO5 fgM3ryFC0PtKQvXiqbT947ZTmozGudUoSeQXA9Lij7Djd+owp/lIjalL9 Sv9NRpJyciECP4Q0USXU1fhIDjC9bO7FEo7G7rdRhErHv3L6FVEEOOSLS g==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600367" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600367" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:35:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699636" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:34:54 -0800 From: Haibo Xu To: Subject: [PATCH v2 2/6] ACPI: RISCV: Add NUMA support based on SRAT and SLIT Date: Thu, 7 Mar 2024 16:47:54 +0800 Message-Id: <7ca110c59cbb2fb358304a9ba4f9c7cbeb191345.1709780590.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003504_410307_1680A5A2 X-CRM114-Status: GOOD ( 26.20 ) 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: , Cc: Alison Schofield , Zong Li , "Rafael J. Wysocki" , Dave Hansen , linux-kernel@vger.kernel.org, Conor Dooley , Guo Ren , Jisheng Zhang , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , Marc Zyngier , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Dan Williams , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , "Russell King \(Oracle\)" , Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add acpi_numa.c file to enable parse NUMA information from ACPI SRAT and SLIT tables. SRAT table provide CPUs(Hart) and memory nodes to proximity domain mapping, while SLIT table provide the distance metrics between proximity domains. Signed-off-by: Haibo Xu Reviewed-by: Sunil V L --- arch/riscv/include/asm/acpi.h | 15 +++- arch/riscv/kernel/Makefile | 1 + arch/riscv/kernel/acpi.c | 5 -- arch/riscv/kernel/acpi_numa.c | 131 ++++++++++++++++++++++++++++++++++ arch/riscv/kernel/setup.c | 4 +- arch/riscv/kernel/smpboot.c | 2 - include/linux/acpi.h | 6 ++ 7 files changed, 154 insertions(+), 10 deletions(-) create mode 100644 arch/riscv/kernel/acpi_numa.c diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h index 7dad0cf9d701..e0a1f84404f3 100644 --- a/arch/riscv/include/asm/acpi.h +++ b/arch/riscv/include/asm/acpi.h @@ -61,11 +61,14 @@ static inline void arch_fix_phys_package_id(int num, u32 slot) { } void acpi_init_rintc_map(void); struct acpi_madt_rintc *acpi_cpu_get_madt_rintc(int cpu); -u32 get_acpi_id_for_cpu(int cpu); +static inline u32 get_acpi_id_for_cpu(int cpu) +{ + return acpi_cpu_get_madt_rintc(cpu)->uid; +} + int acpi_get_riscv_isa(struct acpi_table_header *table, unsigned int cpu, const char **isa); -static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; } void acpi_get_cbo_block_size(struct acpi_table_header *table, u32 *cbom_size, u32 *cboz_size, u32 *cbop_size); #else @@ -87,4 +90,12 @@ static inline void acpi_get_cbo_block_size(struct acpi_table_header *table, #endif /* CONFIG_ACPI */ +#ifdef CONFIG_ACPI_NUMA +int acpi_numa_get_nid(unsigned int cpu); +void acpi_map_cpus_to_nodes(void); +#else +static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; } +static inline void acpi_map_cpus_to_nodes(void) { } +#endif /* CONFIG_ACPI_NUMA */ + #endif /*_ASM_ACPI_H*/ diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile index f71910718053..5d3e9cf89b76 100644 --- a/arch/riscv/kernel/Makefile +++ b/arch/riscv/kernel/Makefile @@ -105,3 +105,4 @@ obj-$(CONFIG_COMPAT) += compat_vdso/ obj-$(CONFIG_64BIT) += pi/ obj-$(CONFIG_ACPI) += acpi.o +obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o diff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c index e619edc8b0cc..040bdbfea2b4 100644 --- a/arch/riscv/kernel/acpi.c +++ b/arch/riscv/kernel/acpi.c @@ -191,11 +191,6 @@ struct acpi_madt_rintc *acpi_cpu_get_madt_rintc(int cpu) return &cpu_madt_rintc[cpu]; } -u32 get_acpi_id_for_cpu(int cpu) -{ - return acpi_cpu_get_madt_rintc(cpu)->uid; -} - /* * __acpi_map_table() will be called before paging_init(), so early_ioremap() * or early_memremap() should be called here to for ACPI table mapping. diff --git a/arch/riscv/kernel/acpi_numa.c b/arch/riscv/kernel/acpi_numa.c new file mode 100644 index 000000000000..0231482d6946 --- /dev/null +++ b/arch/riscv/kernel/acpi_numa.c @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * ACPI 6.6 based NUMA setup for RISCV + * Lots of code was borrowed from arch/arm64/kernel/acpi_numa.c + * + * Copyright 2004 Andi Kleen, SuSE Labs. + * Copyright (C) 2013-2016, Linaro Ltd. + * Author: Hanjun Guo + * Copyright (C) 2024 Intel Corporation. + * + * Reads the ACPI SRAT table to figure out what memory belongs to which CPUs. + * + * Called from acpi_numa_init while reading the SRAT and SLIT tables. + * Assumes all memory regions belonging to a single proximity domain + * are in one chunk. Holes between them will be included in the node. + */ + +#define pr_fmt(fmt) "ACPI: NUMA: " fmt + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static int acpi_early_node_map[NR_CPUS] __initdata = { NUMA_NO_NODE }; + +int __init acpi_numa_get_nid(unsigned int cpu) +{ + return acpi_early_node_map[cpu]; +} + +static inline int get_cpu_for_acpi_id(u32 uid) +{ + int cpu; + + for (cpu = 0; cpu < nr_cpu_ids; cpu++) + if (uid == get_acpi_id_for_cpu(cpu)) + return cpu; + + return -EINVAL; +} + +static int __init acpi_parse_rintc_pxm(union acpi_subtable_headers *header, + const unsigned long end) +{ + struct acpi_srat_rintc_affinity *pa; + int cpu, pxm, node; + + if (srat_disabled()) + return -EINVAL; + + pa = (struct acpi_srat_rintc_affinity *)header; + if (!pa) + return -EINVAL; + + if (!(pa->flags & ACPI_SRAT_RINTC_ENABLED)) + return 0; + + pxm = pa->proximity_domain; + node = pxm_to_node(pxm); + + /* + * If we can't map the UID to a logical cpu this + * means that the UID is not part of possible cpus + * so we do not need a NUMA mapping for it, skip + * the SRAT entry and keep parsing. + */ + cpu = get_cpu_for_acpi_id(pa->acpi_processor_uid); + if (cpu < 0) + return 0; + + acpi_early_node_map[cpu] = node; + pr_info("SRAT: PXM %d -> HARTID 0x%lx -> Node %d\n", pxm, + cpuid_to_hartid_map(cpu), node); + + return 0; +} + +void __init acpi_map_cpus_to_nodes(void) +{ + int i; + + /* + * In ACPI, SMP and CPU NUMA information is provided in separate + * static tables, namely the MADT and the SRAT. + * + * Thus, it is simpler to first create the cpu logical map through + * an MADT walk and then map the logical cpus to their node ids + * as separate steps. + */ + acpi_table_parse_entries(ACPI_SIG_SRAT, sizeof(struct acpi_table_srat), + ACPI_SRAT_TYPE_RINTC_AFFINITY, acpi_parse_rintc_pxm, 0); + + for (i = 0; i < nr_cpu_ids; i++) + early_map_cpu_to_node(i, acpi_numa_get_nid(i)); +} + +/* Callback for Proximity Domain -> logical node ID mapping */ +void __init acpi_numa_rintc_affinity_init(struct acpi_srat_rintc_affinity *pa) +{ + int pxm, node; + + if (srat_disabled()) + return; + + if (pa->header.length < sizeof(struct acpi_srat_rintc_affinity)) { + pr_err("SRAT: Invalid SRAT header length: %d\n", pa->header.length); + bad_srat(); + return; + } + + if (!(pa->flags & ACPI_SRAT_RINTC_ENABLED)) + return; + + pxm = pa->proximity_domain; + node = acpi_map_pxm_to_node(pxm); + + if (node == NUMA_NO_NODE) { + pr_err("SRAT: Too many proximity domains %d\n", pxm); + bad_srat(); + return; + } + + node_set(node, numa_nodes_parsed); +} diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index 4f73c0ae44b2..a2cde65b69e9 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -281,8 +281,10 @@ void __init setup_arch(char **cmdline_p) setup_smp(); #endif - if (!acpi_disabled) + if (!acpi_disabled) { acpi_init_rintc_map(); + acpi_map_cpus_to_nodes(); + } riscv_init_cbo_blocksizes(); riscv_fill_hwcap(); diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index cfbe4b840d42..81a2aa77680c 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -100,7 +100,6 @@ static int __init acpi_parse_rintc(union acpi_subtable_headers *header, const un if (hart == cpuid_to_hartid_map(0)) { BUG_ON(found_boot_cpu); found_boot_cpu = true; - early_map_cpu_to_node(0, acpi_numa_get_nid(cpu_count)); return 0; } @@ -110,7 +109,6 @@ static int __init acpi_parse_rintc(union acpi_subtable_headers *header, const un } cpuid_to_hartid_map(cpu_count) = hart; - early_map_cpu_to_node(cpu_count, acpi_numa_get_nid(cpu_count)); cpu_count++; return 0; diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b7165e52b3c6..f74c62956e07 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -269,6 +269,12 @@ acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { } int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); +#ifdef CONFIG_RISCV +void acpi_numa_rintc_affinity_init(struct acpi_srat_rintc_affinity *pa); +#else +static inline void acpi_numa_rintc_affinity_init(struct acpi_srat_rintc_affinity *pa) { } +#endif + #ifndef PHYS_CPUID_INVALID typedef u32 phys_cpuid_t; #define PHYS_CPUID_INVALID (phys_cpuid_t)(-1) From patchwork Thu Mar 7 08:47:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585182 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 909A2C54E49 for ; Thu, 7 Mar 2024 08:35: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uHnZ7PcxhGfuQW/zv5H3fq6Vw8hxCeQGHYr4PQ6pHjA=; b=b93dW2UhpLsZZN vIFKzEainALwI6aad7sBZKrxoD8f8Jlmmzv7+EFRq8wyw3O0sumPBP0qDmzL8odoNOmDNBdmj8g2n a0LQIP9uWxW2XsO0c6wLgCPsWLOnuzxZkervIF5SI/VVOFFWauip13Z2zwA2JQFk/kHspa4y1H5zn 6tq5umGS+Wd4weuuTfOyG8Am3oLqONYnZYRqEdilqoFHnq/pX9QIQy8VcMMz68lN4+/sGy7zoLmGr tRWtQgP1VsgIjje2OS+QEbwhzgWcNkY3Qhu38R0pDi8cdX8tOLJfl2B3WOORYEs2i/M2xSXdivoRO +yZy4jEZXjxDd2ueW8eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9Dp-00000003eNm-1d7f; Thu, 07 Mar 2024 08:35:25 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9Dm-00000003eLz-0mHJ for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:35:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800523; x=1741336523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zlLV9ie8bQV5hBn/ivuNmVBmT3a1tMf86LVGS17OHVw=; b=R66g4x0YRGqPTYKZne45wF5zYgTsOFnVbprM5NjffBk/0bAZDN2YYbFg gzqlmSWU5WRU1AetcLuj8H9oRg2oggAv+oP9E+d5jy8E+UNs7cgDh/NCR wuBx5qbXCfCgK90e1Qb/+v1dyYwBPRhHd3idJJ6dbhVp/6YLiXXUWh8vH rN9PXJBwmoBrxIC0tumOOduEPrU0fOKka/2iUItfV1oPri3BSM9qicuFa 7XDKVN2mlbejckunK/bPSRpYpxyB+Hk1N3iHSp1AzvC5eomElcznc6Yda rMWGoSMkwJE97aginlXJek9dtzDnWL4aH67qzQe6DgRM6MPxoF3SyQXgi A==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600456" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600456" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:35:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699692" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:35:12 -0800 From: Haibo Xu To: Subject: [PATCH v2 3/6] ACPI: NUMA: Add handler for SRAT RINTC affinity structure Date: Thu, 7 Mar 2024 16:47:55 +0800 Message-Id: <91a4bc39444c80ea960bbd070bea489d27628cb6.1709780590.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003522_336131_C3E4C325 X-CRM114-Status: GOOD ( 12.27 ) 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: , Cc: Alison Schofield , Jisheng Zhang , "Rafael J. Wysocki" , Dave Hansen , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-kernel@vger.kernel.org, Conor Dooley , Guo Ren , Zong Li , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , Sia Jee Heng , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Dan Williams , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Charlie Jenkins , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , "Russell King \(Oracle\)" , Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add RINTC affinity structure handler during parsing SRAT table. Signed-off-by: Haibo Xu Reviewed-by: Sunil V L --- drivers/acpi/numa/srat.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 0214518fc582..1946431c0eef 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -165,6 +165,19 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) } } break; + + case ACPI_SRAT_TYPE_RINTC_AFFINITY: + { + struct acpi_srat_rintc_affinity *p = + (struct acpi_srat_rintc_affinity *)header; + pr_debug("SRAT Processor (acpi id[0x%04x]) in proximity domain %d %s\n", + p->acpi_processor_uid, + p->proximity_domain, + (p->flags & ACPI_SRAT_RINTC_ENABLED) ? + "enabled" : "disabled"); + } + break; + default: pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", header->type); @@ -448,6 +461,21 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *header, } #endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ +static int __init +acpi_parse_rintc_affinity(union acpi_subtable_headers *header, + const unsigned long end) +{ + struct acpi_srat_rintc_affinity *rintc_affinity; + + rintc_affinity = (struct acpi_srat_rintc_affinity *)header; + acpi_table_print_srat_entry(&header->common); + + /* let architecture-dependent part to do it */ + acpi_numa_rintc_affinity_init(rintc_affinity); + + return 0; +} + static int __initdata parsed_numa_memblks; static int __init @@ -501,7 +529,7 @@ int __init acpi_numa_init(void) /* SRAT: System Resource Affinity Table */ if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { - struct acpi_subtable_proc srat_proc[4]; + struct acpi_subtable_proc srat_proc[5]; memset(srat_proc, 0, sizeof(srat_proc)); srat_proc[0].id = ACPI_SRAT_TYPE_CPU_AFFINITY; @@ -512,6 +540,8 @@ int __init acpi_numa_init(void) srat_proc[2].handler = acpi_parse_gicc_affinity; srat_proc[3].id = ACPI_SRAT_TYPE_GENERIC_AFFINITY; srat_proc[3].handler = acpi_parse_gi_affinity; + srat_proc[4].id = ACPI_SRAT_TYPE_RINTC_AFFINITY; + srat_proc[4].handler = acpi_parse_rintc_affinity; acpi_table_parse_entries_array(ACPI_SIG_SRAT, sizeof(struct acpi_table_srat), From patchwork Thu Mar 7 08:47:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585183 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 7AC81C48BF6 for ; Thu, 7 Mar 2024 08:35:47 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7OADF9ZQh3/VqNGDk369L0CmXA2andov75W1qgMLiDc=; b=V/VO6CajlCRqD1 0DQM/1g5Ts2z8LSt23HuHZyXl4kWULPxbsYxF5JZI5I2zE3ilndyYux+r8WiC7wjirMNwf0vM0mEs dDJTx0gZ04qOxp8ScMkD+1/wcP5MrPcrBxXh6qjVtfzNLU+E25QiODdZVpb3pdtt7UIGnp0MextJ9 RFLc7uK6PxjhX0FfmelIkmyTZlzFxX1G4Ar2rfr0VKM8w1l0KEIvcAeU6lUDoPs/87MaJigVfb8ZV vhWky+7nPpm15zEZL/CI/SS5BD/RF+Py8y443hA4TwDPAVCLJpqblnVV9CXFNbXXlwQTJzNN9W86n C2jIKCPuI2qAHjVViY+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9E7-00000003eav-2e64; Thu, 07 Mar 2024 08:35:43 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9E4-00000003eYW-02e4 for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:35:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800540; x=1741336540; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5KryanhO2TCSYIQImaXR38V4BObe+z/AOy3oiI3D08M=; b=FME5uagGse1FoU9KB81NMzNceBtS+ulTxukyKYbhyECd1gFtcwLQDmtm 6xybdezP1yE90zDNBo3xAj8KDTTyS6KIg73CNi7P3PjntTK6aNsZxH3wK O9kPKGxA7F7KbDpuYLrFSIVevpv3Q3y+OnK1MySQdzR8T0qPvssWolzSz k5Xm8Evv2pdSdK7u7n+EyiPsMrPCh/N0I6jXAQXXV5SU4r1qiq1bTh3Cx FMTNUryDzhz+sBK9xZUgRtFOdsSZv/Up5fpwX8o3bNBpsyvZ+8PUTa8vk yrnUheDVACIJWmdXVNCdgr6imW8SqvtpvUyQz8jUNWKfBiv83QLqc8iW3 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600494" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600494" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:35:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699744" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:35:30 -0800 From: Haibo Xu To: Subject: [PATCH v2 4/6] ACPI: NUMA: Make some NUMA related parse functions common Date: Thu, 7 Mar 2024 16:47:56 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003540_427747_1D3C7D3B X-CRM114-Status: UNSURE ( 9.43 ) 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: , Cc: Alison Schofield , Zong Li , "Rafael J. Wysocki" , Dave Hansen , Conor Dooley , Guo Ren , Jisheng Zhang , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Dan Williams , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The acpi_numa_slit_init(), acpi_numa_memory_affinity_init() and acpi_parse_cfmws() functions are common enough to be used on platforms that support ACPI_NUMA(x86/arm64/loongarch). Remove the condition to avoid long defined(CONFIG_ARCH) check when new platform(riscv) support was enabled. Suggested-by: Sunil V L Signed-off-by: Haibo Xu Reviewed-by: Sunil V L --- drivers/acpi/numa/srat.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 1946431c0eef..938c4adb7ec4 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -219,7 +219,6 @@ int __init srat_disabled(void) return acpi_numa < 0; } -#if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH) /* * Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for * I/O localities since SRAT does not list them. I/O localities are @@ -351,13 +350,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, (*fake_pxm)++; return 0; } -#else -static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, - void *arg, const unsigned long table_end) -{ - return 0; -} -#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ static int __init acpi_parse_slit(struct acpi_table_header *table) { From patchwork Thu Mar 7 08:47:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585184 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 97B8FC48BF6 for ; Thu, 7 Mar 2024 08:36:04 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WcDp5RJASnQ9FbawPXWDrz/8YlVp+nY2C86BZfXPbfY=; b=IIFDkRs809Jnc+ vAcpmDtZhJ2ebEoouU4ybII7OMcb0KX6E4RLIS6nINwpYa3pPnRd/0XvSmaZfCFwFVSp/zXikiUtQ OpNxzsIK5lvGjXG8Hvc58+1jwn4FA6xLRFsG3J1+yeoQqgjPxMbpsaVfv+LUt0KOwDMzCs/76Ybom OR/ys7ldUXtG6JgTrFu1ew67YkJCVQ2j8rX4gTGOgJeDPhYXMpTkU2IrK+w1B0Yy/1+nRwYApqJT4 YENeQw0cb9y2rx1Zj1aw2p3gD3jrFRrq5WS01gw4dkRnHtIDL4X8rvtKqmUr/JrsLLxPU9ZpBrKGS ek0C0Mm3n6gRUTrNRt6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9EP-00000003ekq-04WN; Thu, 07 Mar 2024 08:36:01 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9EL-00000003eiw-3A9O for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:35:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800558; x=1741336558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G2PxXHztRKQAfPknbFAyA05wr44/TwgHtP5gL+9Rl30=; b=MlMbRhjgnbhxaH6xbO5QVtZeitPU4cpXqTYCT2iAATg2xEdfUFhvHb1K p6hfiXKPGAUBeVz7D7f4aE2eWaJ7PthSn54iT+qFJyi8Tevcd6pCGCeDD sKEW0Y2oUJWCpaMI4gvy/ieJEXAzF60GRh7v4QpL9WDPhF65LnLuQ4ErF Y05/WNMncqoclrt5yCR7GccqN+jX8bOHH9tKyomHTEhLDzNGuyEoHBXL5 hQkFL9+yJJ/EA/KBjrgnqeTGTmYtZJtW0WBXassTSDQbnl3YwnOy/jgcO Jsu1uFi/eGg68uW4GF+WZrKE/aXQGOCxvjf7AGa3H7vQ8k0/naCXuGGq4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600524" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600524" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:35:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699786" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:35:48 -0800 From: Haibo Xu To: Subject: [PATCH v2 5/6] ACPI: NUMA: Remove ARCH depends option in ACPI_NUMA Kconfig Date: Thu, 7 Mar 2024 16:47:57 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003557_862771_ACFFD85F X-CRM114-Status: GOOD ( 10.24 ) 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: , Cc: Alison Schofield , Jisheng Zhang , "Rafael J. Wysocki" , Dave Hansen , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Conor Dooley , Guo Ren , Zong Li , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Dan Williams , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Charlie Jenkins , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org x86/arm64/loongarch would select ACPI_NUMA by default and riscv would do the same thing, so the dependency is no longer needed since these are the four architectures that support ACPI. Suggested-by: Arnd Bergmann Suggested-by: Sunil V L Signed-off-by: Haibo Xu --- drivers/acpi/numa/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/numa/Kconfig b/drivers/acpi/numa/Kconfig index 849c2bd820b9..2bf47ad1ec9b 100644 --- a/drivers/acpi/numa/Kconfig +++ b/drivers/acpi/numa/Kconfig @@ -2,7 +2,6 @@ config ACPI_NUMA bool "NUMA support" depends on NUMA - depends on (X86 || ARM64 || LOONGARCH) default y if ARM64 config ACPI_HMAT From patchwork Thu Mar 7 08:47:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Haibo1" X-Patchwork-Id: 13585185 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 E4E8BC54E49 for ; Thu, 7 Mar 2024 08:36:23 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uhpyFCSimh37BNz0B3gCynUkYs16oNzlJ0TNBDmJVow=; b=YXCPw7jU9XM+JV Gz7QJ+E3gyU/atk3QyY4rZHV8AjX3XJT2CK8HhKUEl9FVNtQryyPRIN+04ekLjyoHcwTTuq3K62CY TN/wnfoe+s20ld1O5C05nHklvfJ3Ojzu5IBH3A9wMwzvn8V9HMnxnFiji7RUB3R9X7pQ9AUD/lRT7 5UcAl6WiKRETiQvGAaDF6HtLAhTb6nkZpTH6FUV8OKqW/t3nu9vjifgJ0ngOAB+iAUso6rLEaBLka XCi8GZG4iwLAg8+ztT99BnHAH36xLm/Za7ixInJ8dJBAp3i/ZMQmB2TCyfOaDtSbCX10J7pd07NfF bDgkLfBHMoocBV4cLtNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9Ei-00000003ez5-2HZF; Thu, 07 Mar 2024 08:36:20 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri9Ee-00000003ewD-2d2u for linux-riscv@lists.infradead.org; Thu, 07 Mar 2024 08:36:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709800577; x=1741336577; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=u6KLTZtmTIu5DykU16R/5uPB7IyWMKQDWEnAzeiRdU8=; b=Jk4CwirGcOrTGxwCRxOnHVewOY48k+K1y/9LtKipoS8R9+6L1Ph0btlm RySYvV43aIptACLYTmLrfbhbfYXlkhUsk75anJD/PtQQSYv6LJfE9wFPD xZjFi1FfDGiuD5qMC1YnntjN+hkWQB5NXjV43EDlT+p5EzmtFzXGAq0ny eH4+Z66j7nM0XfFimD9mLCnQAC/5lmJpsKFSGXUFA2Ksmh3z52JC1sFJ8 aMfd+kacuwL1znBijGWPqZ7TIWlaooseJWLRjyZM7aIyuHbDVAr4IcGvN IRwdYJ1KgVeymAiMu2EPM3H4r2oJFIwthYmn1WCrN5fDCftmAs8IOtZqR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4600559" X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="4600559" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 00:36:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,210,1705392000"; d="scan'208";a="14699817" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orviesa004.jf.intel.com with ESMTP; 07 Mar 2024 00:36:06 -0800 From: Haibo Xu To: Subject: [PATCH v2 6/6] ACPI: RISCV: Enable ACPI based NUMA Date: Thu, 7 Mar 2024 16:47:58 +0800 Message-Id: <01cb5780041565784d459cd94a5c4f55eaa87739.1709780590.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_003616_829394_3324D9F0 X-CRM114-Status: UNSURE ( 7.53 ) 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: , Cc: Alison Schofield , Jisheng Zhang , "Rafael J. Wysocki" , Dave Hansen , linux-kernel@vger.kernel.org, Conor Dooley , Guo Ren , Zong Li , James Morse , linux-riscv@lists.infradead.org, Ard Biesheuvel , Haibo Xu , Baoquan He , Marc Zyngier , acpica-devel@lists.linux.dev, Robert Moore , linux-acpi@vger.kernel.org, Sami Tolvanen , Greentime Hu , Dan Williams , Len Brown , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Charlie Jenkins , Chen Jiahao , Yuntao Wang , Paul Walmsley , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , xiaobo55x@gmail.com, Anup Patel , Tony Luck , Greg Kroah-Hartman , "Russell King \(Oracle\)" , Samuel Holland , Evan Green , Palmer Dabbelt , ajones@ventanamicro.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Enable ACPI based NUMA for RISCV in Kconfig. Signed-off-by: Haibo Xu --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 0bfcfec67ed5..0fb55f166701 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -447,6 +447,7 @@ config NUMA select HAVE_SETUP_PER_CPU_AREA select NEED_PER_CPU_EMBED_FIRST_CHUNK select NEED_PER_CPU_PAGE_FIRST_CHUNK + select ACPI_NUMA if ACPI select OF_NUMA select USE_PERCPU_NUMA_NODE_ID help