aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-03-25 01:25:17 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-26 22:48:48 -0500
commit4df20460a3ff0d60280738b094945c56cb5567a5 (patch)
tree39f831cf5f778b14a08b3453a8f798b2b8be8813 /include/asm-powerpc
parentb4f382a3e5e20ba867e7aa5b01189a3fd40eea2c (diff)
[PATCH] powerpc: Allow non zero boot cpuids
We currently have a hack to flip the boot cpu and its secondary thread to logical cpuid 0 and 1. This means the logical - physical mapping will differ depending on which cpu is boot cpu. This is most apparent on kexec, where we might kexec on any cpu and therefore change the mapping from boot to boot. The patch below does a first pass early on to work out the logical cpuid of the boot thread. We then fix up some paca structures to match. Ive also removed the boot_cpuid_phys variable for ppc64, to be consistent we use get_hard_smp_processor_id(boot_cpuid) everywhere. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/paca.h2
-rw-r--r--include/asm-powerpc/smp.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h
index 4465b95ebef0..706325f99a84 100644
--- a/include/asm-powerpc/paca.h
+++ b/include/asm-powerpc/paca.h
@@ -105,5 +105,7 @@ struct paca_struct {
105 105
106extern struct paca_struct paca[]; 106extern struct paca_struct paca[];
107 107
108void setup_boot_paca(void);
109
108#endif /* __KERNEL__ */ 110#endif /* __KERNEL__ */
109#endif /* _ASM_POWERPC_PACA_H */ 111#endif /* _ASM_POWERPC_PACA_H */
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 98581e5a8279..4a716f707cf6 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -29,7 +29,6 @@
29#endif 29#endif
30 30
31extern int boot_cpuid; 31extern int boot_cpuid;
32extern int boot_cpuid_phys;
33 32
34extern void cpu_die(void); 33extern void cpu_die(void);
35 34
@@ -99,6 +98,7 @@ extern void smp_release_cpus(void);
99#else 98#else
100/* 32-bit */ 99/* 32-bit */
101#ifndef CONFIG_SMP 100#ifndef CONFIG_SMP
101extern int boot_cpuid_phys;
102#define get_hard_smp_processor_id(cpu) boot_cpuid_phys 102#define get_hard_smp_processor_id(cpu) boot_cpuid_phys
103#define set_hard_smp_processor_id(cpu, phys) 103#define set_hard_smp_processor_id(cpu, phys)
104#endif 104#endif