[PATCH 14/14] alpha: use generic CPU device registration

From: Magnus Lindholm

Date: Tue Nov 03 2026 - 16:50:51 EST


Select GENERIC_CPU_DEVICES and remove the private registration initcall.
Alpha keeps its possible and present CPU masks in sync, and the generic
path registers CPU devices after SMP setup using the same register_cpu()
helper.

Signed-off-by: Magnus Lindholm <linmag7@xxxxxxxxx>
---
arch/alpha/Kconfig | 1 +
arch/alpha/kernel/setup.c | 17 -----------------
2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 014a52e63dec88d72c51c93b3d1c254839ecf33c..6ccb2d2303269661eb36ba4892e3026bf595f8a7 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -54,6 +54,7 @@ config ALPHA
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select EDAC_SUPPORT
+ select GENERIC_CPU_DEVICES
select GENERIC_CPU_VULNERABILITIES
select GENERIC_SMP_IDLE_THREAD
select HAS_IOPORT
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 28387786cb9f9ad4b587a22a3b0267b825b424c7..9fda01b73b18414c8d9c12903660024bfc0af94c 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -17,7 +17,6 @@
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
-#include <linux/slab.h>
#include <linux/user.h>
#include <linux/screen_info.h>
#include <linux/delay.h>
@@ -366,22 +365,6 @@ int page_is_ram(unsigned long pfn)
return 0;
}

-static int __init
-register_cpus(void)
-{
- int i;
-
- for_each_possible_cpu(i) {
- struct cpu *p = kzalloc_obj(*p);
- if (!p)
- return -ENOMEM;
- register_cpu(p, i);
- }
- return 0;
-}
-
-arch_initcall(register_cpus);
-
#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_reboot_handler(u8 unused)
{
--
2.43.0