]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
powerpc: Make boot_cpuid common between 32 and 64-bit
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 28 Mar 2014 02:36:27 +0000 (13:36 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 7 Apr 2014 00:33:14 +0000 (10:33 +1000)
Move the definition to setup-common.c and set the init value
to -1 on both 32 and 64-bit (it was 0 on 64-bit).

Additionally add a check to prom.c to garantee that the init
value has been udpated after the DT scan.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c

index 337646ce4f34bd492a0b79959e8568f0f715e5b8..ea50a7ecd81b333e2e0dd52c5a51f4440220170d 100644 (file)
@@ -747,6 +747,10 @@ void __init early_init_devtree(void *params)
         * (altivec support, boot CPU ID, ...)
         */
        of_scan_flat_dt(early_init_dt_scan_cpus, NULL);
+       if (boot_cpuid < 0) {
+               printk("Failed to indentify boot CPU !\n");
+               BUG();
+       }
 
 #if defined(CONFIG_SMP) && defined(CONFIG_PPC64)
        /* We'll later wait for secondaries to check in; there are
index bc76cc6b419c2a8d0b5491637afadfe046278142..79b7612ac6fa34f7e1d77c1db95f399f7be3bcc1 100644 (file)
@@ -76,6 +76,9 @@ EXPORT_SYMBOL(ppc_md);
 struct machdep_calls *machine_id;
 EXPORT_SYMBOL(machine_id);
 
+int boot_cpuid = -1;
+EXPORT_SYMBOL_GPL(boot_cpuid);
+
 unsigned long klimit = (unsigned long) _end;
 
 char cmd_line[COMMAND_LINE_SIZE];
index 04cc4fcca78b690f86c089708745e6c4cc0f5939..ea4fda60e57b93f18163b487a4bd2a56d43715ba 100644 (file)
@@ -44,8 +44,6 @@
 
 extern void bootx_init(unsigned long r4, unsigned long phys);
 
-int boot_cpuid = -1;
-EXPORT_SYMBOL_GPL(boot_cpuid);
 int boot_cpuid_phys;
 EXPORT_SYMBOL_GPL(boot_cpuid_phys);
 
index 4933909cc5c001045b57f8fffef44c2a42478985..d8aabbdc6483572d059c53362a8d28627712aa5e 100644 (file)
@@ -74,7 +74,6 @@
 #define DBG(fmt...)
 #endif
 
-int boot_cpuid = 0;
 int spinning_secondaries;
 u64 ppc64_pft_size;