summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/devicetree.c
diff options
context:
space:
mode:
authorSaurabh Sengar <ssengar@linux.microsoft.com>2024-04-02 16:40:28 +0200
committerIngo Molnar <mingo@kernel.org>2024-04-03 08:46:08 +0200
commit222408cde4d0ab17e54d4db26751c2b5cab9ac2b (patch)
tree527029165d2850f8b1f9eb5f3fbee510405ee7f5 /arch/x86/kernel/devicetree.c
parentx86/hyperv/vtl: Correct x86_init.mpparse.parse_smp_cfg assignment (diff)
downloadlinux-222408cde4d0ab17e54d4db26751c2b5cab9ac2b.tar.xz
linux-222408cde4d0ab17e54d4db26751c2b5cab9ac2b.zip
x86/of: Set the parse_smp_cfg for all the DeviceTree platforms by default
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 <ssengar@linux.microsoft.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/1712068830-4513-3-git-send-email-ssengar@linux.microsoft.com
Diffstat (limited to 'arch/x86/kernel/devicetree.c')
-rw-r--r--arch/x86/kernel/devicetree.c6
1 files changed, 4 insertions, 2 deletions
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();
}
-#ifdef CONFIG_OF_EARLY_FLATTREE
void __init x86_flattree_get_config(void)
{
+#ifdef CONFIG_OF_EARLY_FLATTREE
u32 size, map_len;
void *dt;
@@ -301,8 +301,10 @@ void __init x86_flattree_get_config(void)
if (initial_dtb)
early_memunmap(dt, map_len);
-}
#endif
+ if (of_have_populated_dt())
+ x86_init.mpparse.parse_smp_cfg = x86_dtb_parse_smp_config;
+}
void __init x86_dtb_parse_smp_config(void)
{