diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-20 23:20:42 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-20 23:20:42 -0400 |
commit | 4a6feab0ee5240c4bd5378d9f8a46b85718c68a7 (patch) | |
tree | 883f73dbb1e1ed80ae098b794d20ce1d09d1c88b | |
parent | a9079ca0cb15feda15e7a380092e02d5cd834148 (diff) |
sh: __cpuinit annotate the CPU init path.
All of the regular CPU init path needs to be __cpuinit annotated for CPU
hotplug.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/processor_32.h | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/init.c | 20 | ||||
-rw-r--r-- | arch/sh/kernel/head_32.S | 2 | ||||
-rw-r--r-- | arch/sh/kernel/process.c | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h index c2be22505fee..26b3f026eec9 100644 --- a/arch/sh/include/asm/processor.h +++ b/arch/sh/include/asm/processor.h | |||
@@ -102,6 +102,7 @@ struct task_struct; | |||
102 | 102 | ||
103 | extern struct pt_regs fake_swapper_regs; | 103 | extern struct pt_regs fake_swapper_regs; |
104 | 104 | ||
105 | extern void cpu_init(void); | ||
105 | extern void cpu_probe(void); | 106 | extern void cpu_probe(void); |
106 | 107 | ||
107 | /* arch/sh/kernel/process.c */ | 108 | /* arch/sh/kernel/process.c */ |
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index 572b4eb09493..61a445d2d02a 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #define CCN_CVR 0xff000040 | 27 | #define CCN_CVR 0xff000040 |
28 | #define CCN_PRR 0xff000044 | 28 | #define CCN_PRR 0xff000044 |
29 | 29 | ||
30 | asmlinkage void __init sh_cpu_init(void); | ||
31 | |||
32 | /* | 30 | /* |
33 | * User space process size: 2GB. | 31 | * User space process size: 2GB. |
34 | * | 32 | * |
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c index ffaa00a2216b..97661061ff20 100644 --- a/arch/sh/kernel/cpu/init.c +++ b/arch/sh/kernel/cpu/init.c | |||
@@ -43,9 +43,9 @@ | |||
43 | * peripherals (nofpu, nodsp, and so forth). | 43 | * peripherals (nofpu, nodsp, and so forth). |
44 | */ | 44 | */ |
45 | #define onchip_setup(x) \ | 45 | #define onchip_setup(x) \ |
46 | static int x##_disabled __initdata = !cpu_has_##x; \ | 46 | static int x##_disabled __cpuinitdata = !cpu_has_##x; \ |
47 | \ | 47 | \ |
48 | static int __init x##_setup(char *opts) \ | 48 | static int __cpuinit x##_setup(char *opts) \ |
49 | { \ | 49 | { \ |
50 | x##_disabled = 1; \ | 50 | x##_disabled = 1; \ |
51 | return 1; \ | 51 | return 1; \ |
@@ -59,7 +59,7 @@ onchip_setup(dsp); | |||
59 | #define CPUOPM 0xff2f0000 | 59 | #define CPUOPM 0xff2f0000 |
60 | #define CPUOPM_RABD (1 << 5) | 60 | #define CPUOPM_RABD (1 << 5) |
61 | 61 | ||
62 | static void __init speculative_execution_init(void) | 62 | static void __cpuinit speculative_execution_init(void) |
63 | { | 63 | { |
64 | /* Clear RABD */ | 64 | /* Clear RABD */ |
65 | __raw_writel(__raw_readl(CPUOPM) & ~CPUOPM_RABD, CPUOPM); | 65 | __raw_writel(__raw_readl(CPUOPM) & ~CPUOPM_RABD, CPUOPM); |
@@ -78,7 +78,7 @@ static void __init speculative_execution_init(void) | |||
78 | #define EXPMASK_BRDSSLP (1 << 1) | 78 | #define EXPMASK_BRDSSLP (1 << 1) |
79 | #define EXPMASK_MMCAW (1 << 4) | 79 | #define EXPMASK_MMCAW (1 << 4) |
80 | 80 | ||
81 | static void __init expmask_init(void) | 81 | static void __cpuinit expmask_init(void) |
82 | { | 82 | { |
83 | unsigned long expmask = __raw_readl(EXPMASK); | 83 | unsigned long expmask = __raw_readl(EXPMASK); |
84 | 84 | ||
@@ -217,7 +217,7 @@ static void detect_cache_shape(void) | |||
217 | l2_cache_shape = -1; /* No S-cache */ | 217 | l2_cache_shape = -1; /* No S-cache */ |
218 | } | 218 | } |
219 | 219 | ||
220 | static void __init fpu_init(void) | 220 | static void __cpuinit fpu_init(void) |
221 | { | 221 | { |
222 | /* Disable the FPU */ | 222 | /* Disable the FPU */ |
223 | if (fpu_disabled && (current_cpu_data.flags & CPU_HAS_FPU)) { | 223 | if (fpu_disabled && (current_cpu_data.flags & CPU_HAS_FPU)) { |
@@ -230,7 +230,7 @@ static void __init fpu_init(void) | |||
230 | } | 230 | } |
231 | 231 | ||
232 | #ifdef CONFIG_SH_DSP | 232 | #ifdef CONFIG_SH_DSP |
233 | static void __init release_dsp(void) | 233 | static void __cpuinit release_dsp(void) |
234 | { | 234 | { |
235 | unsigned long sr; | 235 | unsigned long sr; |
236 | 236 | ||
@@ -244,7 +244,7 @@ static void __init release_dsp(void) | |||
244 | ); | 244 | ); |
245 | } | 245 | } |
246 | 246 | ||
247 | static void __init dsp_init(void) | 247 | static void __cpuinit dsp_init(void) |
248 | { | 248 | { |
249 | unsigned long sr; | 249 | unsigned long sr; |
250 | 250 | ||
@@ -276,11 +276,11 @@ static void __init dsp_init(void) | |||
276 | release_dsp(); | 276 | release_dsp(); |
277 | } | 277 | } |
278 | #else | 278 | #else |
279 | static inline void __init dsp_init(void) { } | 279 | static inline void __cpuinit dsp_init(void) { } |
280 | #endif /* CONFIG_SH_DSP */ | 280 | #endif /* CONFIG_SH_DSP */ |
281 | 281 | ||
282 | /** | 282 | /** |
283 | * sh_cpu_init | 283 | * cpu_init |
284 | * | 284 | * |
285 | * This is our initial entry point for each CPU, and is invoked on the | 285 | * This is our initial entry point for each CPU, and is invoked on the |
286 | * boot CPU prior to calling start_kernel(). For SMP, a combination of | 286 | * boot CPU prior to calling start_kernel(). For SMP, a combination of |
@@ -295,7 +295,7 @@ static inline void __init dsp_init(void) { } | |||
295 | * Each processor family is still responsible for doing its own probing | 295 | * Each processor family is still responsible for doing its own probing |
296 | * and cache configuration in cpu_probe(). | 296 | * and cache configuration in cpu_probe(). |
297 | */ | 297 | */ |
298 | asmlinkage void __init sh_cpu_init(void) | 298 | asmlinkage void __cpuinit cpu_init(void) |
299 | { | 299 | { |
300 | current_thread_info()->cpu = hard_smp_processor_id(); | 300 | current_thread_info()->cpu = hard_smp_processor_id(); |
301 | 301 | ||
diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S index fe0b743881b0..8c1fc9a9fab2 100644 --- a/arch/sh/kernel/head_32.S +++ b/arch/sh/kernel/head_32.S | |||
@@ -335,7 +335,7 @@ ENTRY(stack_start) | |||
335 | 3: .long __bss_start | 335 | 3: .long __bss_start |
336 | 4: .long _end | 336 | 4: .long _end |
337 | 5: .long start_kernel | 337 | 5: .long start_kernel |
338 | 6: .long sh_cpu_init | 338 | 6: .long cpu_init |
339 | 7: .long init_thread_union | 339 | 7: .long init_thread_union |
340 | 340 | ||
341 | #ifdef CONFIG_PMB | 341 | #ifdef CONFIG_PMB |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 81add9b9ea6e..4d49c8643777 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -89,7 +89,7 @@ void arch_task_cache_init(void) | |||
89 | # define HAVE_SOFTFP 0 | 89 | # define HAVE_SOFTFP 0 |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | void init_thread_xstate(void) | 92 | void __cpuinit init_thread_xstate(void) |
93 | { | 93 | { |
94 | if (boot_cpu_data.flags & CPU_HAS_FPU) | 94 | if (boot_cpu_data.flags & CPU_HAS_FPU) |
95 | xstate_size = sizeof(struct sh_fpu_hard_struct); | 95 | xstate_size = sizeof(struct sh_fpu_hard_struct); |