diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2013-11-19 19:05:01 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-11-20 18:33:44 -0500 |
commit | 3eb906c6b6c123513718e7742a96a4189f900382 (patch) | |
tree | 116cb8384e74dd0e6466172f87dd309a9a85e0ce /arch/powerpc/include/asm/smp.h | |
parent | c6102609289de268bcc6093e606483ea8bb35c84 (diff) |
powerpc: Make cpu_to_chip_id() available when SMP=n
Up until now we have only used cpu_to_chip_id() in the topology code,
which is only used on SMP builds. However my recent commit a4da0d5
"Implement arch_get_random_long/int() for powernv" added a usage when
SMP=n, breaking the build.
Move cpu_to_chip_id() into prom.c so it is available for SMP=n builds.
We would move the extern to prom.h, but that breaks the include in
topology.h. Instead we leave it in smp.h, but move it out of the
CONFIG_SMP #ifdef. We also need to include asm/smp.h in rng.c, because
the linux version skips asm/smp.h on UP. What a mess.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/smp.h')
-rw-r--r-- | arch/powerpc/include/asm/smp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 98da78e0c2c0..084e0807db98 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -33,6 +33,7 @@ extern int boot_cpuid; | |||
33 | extern int spinning_secondaries; | 33 | extern int spinning_secondaries; |
34 | 34 | ||
35 | extern void cpu_die(void); | 35 | extern void cpu_die(void); |
36 | extern int cpu_to_chip_id(int cpu); | ||
36 | 37 | ||
37 | #ifdef CONFIG_SMP | 38 | #ifdef CONFIG_SMP |
38 | 39 | ||
@@ -112,7 +113,6 @@ static inline struct cpumask *cpu_core_mask(int cpu) | |||
112 | } | 113 | } |
113 | 114 | ||
114 | extern int cpu_to_core_id(int cpu); | 115 | extern int cpu_to_core_id(int cpu); |
115 | extern int cpu_to_chip_id(int cpu); | ||
116 | 116 | ||
117 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. | 117 | /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. |
118 | * | 118 | * |