]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu()
authorShivank Garg <shivankg@amd.com>
Tue, 12 Nov 2024 07:23:47 +0000 (07:23 +0000)
committerIngo Molnar <mingo@kernel.org>
Tue, 12 Nov 2024 10:00:50 +0000 (11:00 +0100)
Remove unnecessary CONFIG_NUMA #ifdef around numa_add_cpu() since the
function is already properly handled in <asm/numa.h> for both NUMA and
non-NUMA configurations. For !CONFIG_NUMA builds, numa_add_cpu() is
defined as an empty function.

Simplify the code without any functionality change.

Testing: Build CONFIG_NUMA=n

Signed-off-by: Shivank Garg <shivankg@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20241112072346.428623-1-shivankg@amd.com
arch/x86/kernel/cpu/common.c

index 07a34d723505741c2308e27a6a349e0c78717580..59dc73558fe3af3de69b2c3827978b21c4c343fc 100644 (file)
@@ -1902,9 +1902,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
        /* Init Machine Check Exception if available. */
        mcheck_cpu_init(c);
 
-#ifdef CONFIG_NUMA
        numa_add_cpu(smp_processor_id());
-#endif
 }
 
 /*