From nobody Mon Feb 9 10:24:43 2026 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 771A813958B; Tue, 2 Apr 2024 14:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068835; cv=none; b=IVLQW/lwC3rRFBCccXoWimsgJBQGQXVUd124ZogdclQ4vVgYqNt2NNOsxDQwXb3wr5rBImygfNhLAOxPT8KUb9PgrwCJC+pElpvgFZsWpucBr2OXUdw0loWi31cAAXVtBt2O/CNdX5AHG8NN+BF/WYCNEu/G7NYPq2lKkUgP9/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068835; c=relaxed/simple; bh=1hJbsqhoLnBielyur7kmAgd+m/zUyjW+WQucPoT35FI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=sDwH5af8Rj9/yuYB7cYk6OyApWmg+Dib7DA4LAUM8iKvsmumvzObZreHtMw8xdTt1PTrusLr83TBxORhppuVeIMySpa1W5PyUixczeXdup2jqagbSnNeQt7TVgthUcHJ7u4IhK3eBou8iRltJ7/XSisop7FdETaPN/7Nij6hy+w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=L4r7T8rm; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="L4r7T8rm" Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 1858020E8BDC; Tue, 2 Apr 2024 07:40:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1858020E8BDC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1712068834; bh=0DUB2Rr6vStJKVui5qUb+UVcqr9kyUH/Bvk23LcaMYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L4r7T8rmdmyf6sHV+mcELv1sGeEjohTE64/mG/b9xla015hLstlbhSV+3nGYWOvdR NFibaKw4Nsz/S6zkHlw+yL7DMKSZWSZQvF8K9Ib6hlVKX7XWHFNV2uvCw5DQtNtupp jsbToVf62PzwwlHJUHkn3zeYlJZFTavttIZy/e9c= From: Saurabh Sengar To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, peterz@infradead.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: ssengar@microsoft.com Subject: [PATCH v2 1/4] x86/hyperv/vtl: Correct parse_smp_cfg assignment Date: Tue, 2 Apr 2024 07:40:27 -0700 Message-Id: <1712068830-4513-2-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> References: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" VTL platform uses DeviceTree for fetching SMP configuration, assign the correct parsing function 'x86_dtb_parse_smp_config' for it to parse_smp_cfg. Fixes: c22e19cd2c8a ("x86/hyperv/vtl: Prepare for separate mpparse callback= s") Signed-off-by: Saurabh Sengar Acked-by: Wei Liu --- arch/x86/hyperv/hv_vtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/hyperv/hv_vtl.c b/arch/x86/hyperv/hv_vtl.c index 5c7de79423b8..3efd0e03b916 100644 --- a/arch/x86/hyperv/hv_vtl.c +++ b/arch/x86/hyperv/hv_vtl.c @@ -34,7 +34,7 @@ void __init hv_vtl_init_platform(void) /* Avoid searching for BIOS MP tables */ x86_init.mpparse.find_mptable =3D x86_init_noop; x86_init.mpparse.early_parse_smp_cfg =3D x86_init_noop; - x86_init.mpparse.parse_smp_cfg =3D x86_init_noop; + x86_init.mpparse.parse_smp_cfg =3D x86_dtb_parse_smp_config; =20 x86_platform.get_wallclock =3D get_rtc_noop; x86_platform.set_wallclock =3D set_rtc_noop; --=20 2.34.1 From nobody Mon Feb 9 10:24:43 2026 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D89F134751; Tue, 2 Apr 2024 14:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068836; cv=none; b=qtJhY0RPc34FLNFMo7MsPWMWyjFalRwDwJY/+iDegNZztFHfjoCs1fIGkgjCSbEZtdaIuyk2/2QHOKB5syMS0FFXmouNXeS6N2Q3QTEUDsOwbFuTo1l9Mrihby8iIjoxvCVSxJzlaE1vRr95EZU5HFKUfnUf1bkkIbkRdtlC6uY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068836; c=relaxed/simple; bh=LGvutjpkGdUNLb7FeEjh/H5aVzdh5g2v+616cP5TxXs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Xqs1/kALw3J2JKaFs5ZL15+GNscTuPlgk2/eJ4UU5Oi2divsjlTUjTJNtR7ntNWRSHhNS1cGb21t3f2KhIE15Ul9uCNglfDQ9tu3/wP9QB6KS+zAWvirCpBiTYu4K1TVXVrXo8Y+rGaBV0Xc0jYKiB8Cbw5ThRvYY07XXcnzA0s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=c4LCPe/z; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="c4LCPe/z" Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 328A520E8BDE; Tue, 2 Apr 2024 07:40:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 328A520E8BDE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1712068834; bh=NV8rpG6eOQycLeq9uJr+csZD/Q4w+0yFEhPCcY4JMrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c4LCPe/zMP74nz6m2C904jWcf7ExFFLWGbPWaQKkpKKBFvqb1Eq93PpIWG/ssJ+EH Pa2CpkiQERpWvbAZbPR8FikEQ2XwPpRtuAevksfKmR2xluVy4y3979zSTlDCIzMSLh OeXLjmHlxu8cMPA9ky04gz2dWmI1VS4vWb0qrlUc= From: Saurabh Sengar To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, peterz@infradead.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: ssengar@microsoft.com Subject: [PATCH v2 2/4] x86/of: Set the parse_smp_cfg for all the DeviceTree platforms by default Date: Tue, 2 Apr 2024 07:40:28 -0700 Message-Id: <1712068830-4513-3-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> References: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" x86_dtb_parse_smp_config must be set by DeviceTree platform for parsing SMP configuration. Set the parse_smp_cfg pointer to x86_dtb_parse_smp_config by default so that all the dtb platforms need not to assign it explicitly. Today there are only two platforms using DeviceTree in x86, ce4100 and hv_vtl. Remove the explicit assignment of x86_dtb_parse_smp_config function from these. Signed-off-by: Saurabh Sengar --- arch/x86/hyperv/hv_vtl.c | 1 - arch/x86/include/asm/prom.h | 7 ++----- arch/x86/kernel/devicetree.c | 6 ++++-- arch/x86/platform/ce4100/ce4100.c | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/x86/hyperv/hv_vtl.c b/arch/x86/hyperv/hv_vtl.c index 3efd0e03b916..04775346369c 100644 --- a/arch/x86/hyperv/hv_vtl.c +++ b/arch/x86/hyperv/hv_vtl.c @@ -34,7 +34,6 @@ void __init hv_vtl_init_platform(void) /* Avoid searching for BIOS MP tables */ x86_init.mpparse.find_mptable =3D x86_init_noop; x86_init.mpparse.early_parse_smp_cfg =3D x86_init_noop; - x86_init.mpparse.parse_smp_cfg =3D x86_dtb_parse_smp_config; =20 x86_platform.get_wallclock =3D get_rtc_noop; x86_platform.set_wallclock =3D set_rtc_noop; diff --git a/arch/x86/include/asm/prom.h b/arch/x86/include/asm/prom.h index 043758a2e627..02644e010514 100644 --- a/arch/x86/include/asm/prom.h +++ b/arch/x86/include/asm/prom.h @@ -24,18 +24,15 @@ extern u64 initial_dtb; extern void add_dtb(u64 data); void x86_of_pci_init(void); void x86_dtb_parse_smp_config(void); +void x86_flattree_get_config(void); #else static inline void add_dtb(u64 data) { } static inline void x86_of_pci_init(void) { } static inline void x86_dtb_parse_smp_config(void) { } +static inline void x86_flattree_get_config(void) { } #define of_ioapic 0 #endif =20 -#ifdef CONFIG_OF_EARLY_FLATTREE -void x86_flattree_get_config(void); -#else -static inline void x86_flattree_get_config(void) { } -#endif extern char cmd_line[COMMAND_LINE_SIZE]; =20 #endif /* __ASSEMBLY__ */ diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 003e0298f46a..0d3a50e8395d 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -277,9 +277,9 @@ static void __init dtb_apic_setup(void) dtb_ioapic_setup(); } =20 -#ifdef CONFIG_OF_EARLY_FLATTREE void __init x86_flattree_get_config(void) { +#ifdef CONFIG_OF_EARLY_FLATTREE u32 size, map_len; void *dt; =20 @@ -301,8 +301,10 @@ void __init x86_flattree_get_config(void) =20 if (initial_dtb) early_memunmap(dt, map_len); -} #endif + if (of_have_populated_dt()) + x86_init.mpparse.parse_smp_cfg =3D x86_dtb_parse_smp_config; +} =20 void __init x86_dtb_parse_smp_config(void) { diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/c= e4100.c index f32451bdcfdd..f8126821a94d 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c @@ -139,7 +139,6 @@ void __init x86_ce4100_early_setup(void) x86_init.resources.probe_roms =3D x86_init_noop; x86_init.mpparse.find_mptable =3D x86_init_noop; x86_init.mpparse.early_parse_smp_cfg =3D x86_init_noop; - x86_init.mpparse.parse_smp_cfg =3D x86_dtb_parse_smp_config; x86_init.pci.init =3D ce4100_pci_init; x86_init.pci.init_irq =3D sdv_pci_init; =20 --=20 2.34.1 From nobody Mon Feb 9 10:24:43 2026 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B98E913A252; Tue, 2 Apr 2024 14:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068836; cv=none; b=gdRqykrTz+ITRu1j/KkfMPuuS1FWoZ8z6xSH71Q35UOY3CSpoDXx3LaGOrZfv3qfsGW25m2cxijKtyS3ZKxvRV7TA9IbCayLnignO5M/S+ncxwUxNNLIOnw7At1cXDLvzD3tZ7sfvAWCiuCtMABqxUpC366KcC+kHsLLeuJYEac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068836; c=relaxed/simple; bh=Jsd3zd17n/TDUkNXvdKZWgOsivzIMCoQWiDVfCJsJDE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=PJn0p+YbnY9u65wiIjlEjIGorBerVDDjEzim4CRMwCDkZpLuD0mOagOFxBpYv+ZVlKdNCJ0rMMFIjjbMNmZ2YHZMTkgJ3mmF10aGSoGwuf/yUW6CK+W/72fK05GCjGYkJm07t/drxaSsBXuD6bEhtTPXMt1k0UBreyK1bXbHPQw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=m7loHZSH; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="m7loHZSH" Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 4D8F420E8BE0; Tue, 2 Apr 2024 07:40:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4D8F420E8BE0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1712068834; bh=4LDBkzPb2RKVpqmA4ytrM1NP9pKwE8D6bhLFAbKn0cs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m7loHZSHvBjrkymqt3U0h6AmgggT1Xh3eRQqI3Vitz/jefURPPVRjFFO2O6F0Td/t fAH1XMAqrBWkV8rshpvZwlsxZG1Zn0gfslUnG9xjH+eND3m8SAwhwNDYgFqWXEe43l 2o2MVk1YwtGgHGpQ2MtWfXzR3PK/i631M7R1BCkU= From: Saurabh Sengar To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, peterz@infradead.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: ssengar@microsoft.com Subject: [PATCH v2 3/4] x86/of: Map NUMA node to CPUs as per DeviceTree Date: Tue, 2 Apr 2024 07:40:29 -0700 Message-Id: <1712068830-4513-4-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> References: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Currently for DeviceTree bootup, x86 code does the default mapping of CPUs to NUMA, which is wrong. This can cause incorrect mapping and WARN on a SMT enabled systems like below: CPU #1's smt-sibling CPU #0 is not on the same node! [node: 1 !=3D 0]. Igno= ring dependency. WARNING: CPU: 1 PID: 0 at topology_sane.isra.0+0x5c/0x6d match_smt+0xf6/0xfc set_cpu_sibling_map.cold+0x24f/0x512 start_secondary+0x5c/0x110 Add the set_apicid_to_node() function in dtb_cpu_setup() for allowing the NUMA to CPU mapping for DeviceTree platforms. Signed-off-by: Saurabh Sengar --- arch/x86/kernel/devicetree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 0d3a50e8395d..b93ce8a39ff7 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -24,6 +24,7 @@ #include #include #include +#include #include =20 __initdata u64 initial_dtb; @@ -137,6 +138,7 @@ static void __init dtb_cpu_setup(void) continue; } topology_register_apic(apic_id, CPU_ACPIID_INVALID, true); + set_apicid_to_node(apic_id, of_node_to_nid(dn)); } } =20 --=20 2.34.1 From nobody Mon Feb 9 10:24:43 2026 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B705813A24A; Tue, 2 Apr 2024 14:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068836; cv=none; b=H+/2ZT1BmWWUWsLvDi2RznGEHGatz4R/5/8XhIoihQqysLp6RhGuyUI+XMrpTSSzMJwS5uV2F57brsZKA3RojY9lu5vBxvRCkamiYCSDh3RjP3deJnGFtNamoRXecHzskZOpch0IjsZwm3gU7dPp3pDC7J+zQlRUg/pKGAABgKA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712068836; c=relaxed/simple; bh=YvVmVZvz7J+cr8gENpnBQYE+cXgUIQDILN5r7tZQ7Qs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=bv1x09Tg05Ah2R/gRwUNxdnUBPyLm70N8ab7P7lhe6syycw19/fTQBhfORfc+W+IbnXuZzTdX+GmHX/QS+yRLAOHGYUzxPPYf0JBOQW2TPc7QYO9QR0L3t50P7hljj1ul2nnLZM/xVgrT+Jiczo/b43gJ04SR++KmgXV4mL1CMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=onOcYKkH; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="onOcYKkH" Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 66E1F20E8BE4; Tue, 2 Apr 2024 07:40:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 66E1F20E8BE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1712068834; bh=l7q/Xpa0oUdw6nw11CmHiga/JBvqg3PJnzbMoVZzr2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=onOcYKkHQPd5L+zdY0DjwxgjbBKRQtqipRK3Kqgi+U4iT3QBgLToQAxCYOeq8O+kh RnoGQtfvbR2dZJKUU5FKRRy4SBsVbAoYKZiyJa5YEQ2XKkO9KzH7IEvT6+Ks8HKdOU 0v2Jh9HPDGQKjt28+6sH4At7gTcC9bPY8IymMHZg= From: Saurabh Sengar To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, peterz@infradead.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: ssengar@microsoft.com Subject: [PATCH v2 4/4] x86/of: Change x86_dtb_parse_smp_config to static Date: Tue, 2 Apr 2024 07:40:30 -0700 Message-Id: <1712068830-4513-5-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> References: <1712068830-4513-1-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" x86_dtb_parse_smp_config is called locally only, change it to static. Signed-off-by: Saurabh Sengar --- arch/x86/include/asm/prom.h | 2 -- arch/x86/kernel/devicetree.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/prom.h b/arch/x86/include/asm/prom.h index 02644e010514..365798cb4408 100644 --- a/arch/x86/include/asm/prom.h +++ b/arch/x86/include/asm/prom.h @@ -23,12 +23,10 @@ extern int of_ioapic; extern u64 initial_dtb; extern void add_dtb(u64 data); void x86_of_pci_init(void); -void x86_dtb_parse_smp_config(void); void x86_flattree_get_config(void); #else static inline void add_dtb(u64 data) { } static inline void x86_of_pci_init(void) { } -static inline void x86_dtb_parse_smp_config(void) { } static inline void x86_flattree_get_config(void) { } #define of_ioapic 0 #endif diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index b93ce8a39ff7..8e3c53b4d070 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -279,6 +279,15 @@ static void __init dtb_apic_setup(void) dtb_ioapic_setup(); } =20 +static void __init x86_dtb_parse_smp_config(void) +{ + if (!of_have_populated_dt()) + return; + + dtb_setup_hpet(); + dtb_apic_setup(); +} + void __init x86_flattree_get_config(void) { #ifdef CONFIG_OF_EARLY_FLATTREE @@ -307,12 +316,3 @@ void __init x86_flattree_get_config(void) if (of_have_populated_dt()) x86_init.mpparse.parse_smp_cfg =3D x86_dtb_parse_smp_config; } - -void __init x86_dtb_parse_smp_config(void) -{ - if (!of_have_populated_dt()) - return; - - dtb_setup_hpet(); - dtb_apic_setup(); -} --=20 2.34.1