From 5fcafb7a23e35b2f1a5243f4dd536240f52c8ceb Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Thu, 21 Apr 2011 04:20:23 +0000 Subject: sparc32: always define boot_cpu_id Define boot_cpu_id in single-processor kernels as well. This is to support architectures which can boot on other than CPU0. Sam Ravnborg has written the cleanup parts by extracting boot_cpu_id from smp_32.c into setup_32.c and cleaned up sun4d_irq.c. boot_cpu_id was initialized before BSS was cleared in sun4c_continue_boot, instead boot_cpu_id is set to 0xff to avoid BSS. If boot_cpu_id is untouched (0xff) by bootup code it will be overwritten to 0. boot_cpu_id4 is automatically calculated in common code. Signed-off-by: Daniel Hellstrom Signed-off-by: David S. Miller --- arch/sparc/kernel/setup_32.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/sparc/kernel/setup_32.c') diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index ef8a2ed95161..3609bdee9ed2 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c @@ -103,6 +103,10 @@ static unsigned int boot_flags __initdata = 0; /* Exported for mm/init.c:paging_init. */ unsigned long cmdline_memory_size __initdata = 0; +/* which CPU booted us (0xff = not set) */ +unsigned char boot_cpu_id = 0xff; /* 0xff will make it into DATA section... */ +unsigned char boot_cpu_id4; /* boot_cpu_id << 2 */ + static void prom_console_write(struct console *con, const char *s, unsigned n) { -- cgit v1.2.2