* [PATCH] x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu()
@ 2024-11-12 7:23 Shivank Garg
2024-11-12 10:08 ` [tip: x86/cpu] " tip-bot2 for Shivank Garg
0 siblings, 1 reply; 2+ messages in thread
From: Shivank Garg @ 2024-11-12 7:23 UTC (permalink / raw)
To: tglx, mingo, bp, dave.hansen, hpa; +Cc: x86, linux-kernel, shivankg
Remove unnecessary CONFIG_NUMA ifdef around numa_add_cpu() since the
function is already properly handled in 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: Make CONFIG_NUMA=n build
Signed-off-by: Shivank Garg <shivankg@amd.com>
---
arch/x86/kernel/cpu/common.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index a5f221ea5688..e5b128fc8184 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1906,9 +1906,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
}
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: x86/cpu] x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu()
2024-11-12 7:23 [PATCH] x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu() Shivank Garg
@ 2024-11-12 10:08 ` tip-bot2 for Shivank Garg
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Shivank Garg @ 2024-11-12 10:08 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Shivank Garg, Ingo Molnar, x86, linux-kernel
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: f74642d81c24d9e69745cd0b75e1bddc81827606
Gitweb: https://git.kernel.org/tip/f74642d81c24d9e69745cd0b75e1bddc81827606
Author: Shivank Garg <shivankg@amd.com>
AuthorDate: Tue, 12 Nov 2024 07:23:47
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 12 Nov 2024 11:00:50 +01:00
x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu()
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 | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 07a34d7..59dc735 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -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
}
/*
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-12 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 7:23 [PATCH] x86/cpu: Remove redundant CONFIG_NUMA guard around numa_add_cpu() Shivank Garg
2024-11-12 10:08 ` [tip: x86/cpu] " tip-bot2 for Shivank Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox