Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] SMP: Scatter __cpuinit over the code as needed.

MIPS doesn't do CPU hotplugging yet but since many of the functions don't
even have an __init let's fix this right.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+20 -20
+3 -3
arch/mips/kernel/smp-mt.c
··· 287 287 * (unsigned long)idle->thread_info the gp 288 288 * assumes a 1:1 mapping of TC => VPE 289 289 */ 290 - void prom_boot_secondary(int cpu, struct task_struct *idle) 290 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 291 291 { 292 292 struct thread_info *gp = task_thread_info(idle); 293 293 dvpe(); ··· 321 321 evpe(EVPE_ENABLE); 322 322 } 323 323 324 - void prom_init_secondary(void) 324 + void __cpuinit prom_init_secondary(void) 325 325 { 326 326 /* Enable per-cpu interrupts */ 327 327 ··· 330 330 (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7)); 331 331 } 332 332 333 - void prom_smp_finish(void) 333 + void __cpuinit prom_smp_finish(void) 334 334 { 335 335 write_c0_compare(read_c0_count() + (8* mips_hpt_frequency/HZ)); 336 336
+3 -3
arch/mips/mips-boards/malta/malta_smtc.c
··· 24 24 * Platform "CPU" startup hook 25 25 */ 26 26 27 - void prom_boot_secondary(int cpu, struct task_struct *idle) 27 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 28 28 { 29 29 smtc_boot_secondary(cpu, idle); 30 30 } ··· 33 33 * Post-config but pre-boot cleanup entry point 34 34 */ 35 35 36 - void prom_init_secondary(void) 36 + void __cpuinit prom_init_secondary(void) 37 37 { 38 38 void smtc_init_secondary(void); 39 39 int myvpe; ··· 75 75 * SMP initialization finalization entry point 76 76 */ 77 77 78 - void prom_smp_finish(void) 78 + void __cpuinit prom_smp_finish(void) 79 79 { 80 80 smtc_smp_finish(); 81 81 }
+3 -3
arch/mips/mipssim/sim_smp.c
··· 53 53 * Platform "CPU" startup hook 54 54 */ 55 55 56 - void prom_boot_secondary(int cpu, struct task_struct *idle) 56 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 57 57 { 58 58 #ifdef CONFIG_MIPS_MT_SMTC 59 59 smtc_boot_secondary(cpu, idle); ··· 64 64 * Post-config but pre-boot cleanup entry point 65 65 */ 66 66 67 - void prom_init_secondary(void) 67 + void __cpuinit prom_init_secondary(void) 68 68 { 69 69 #ifdef CONFIG_MIPS_MT_SMTC 70 70 void smtc_init_secondary(void); ··· 103 103 * SMP initialization finalization entry point 104 104 */ 105 105 106 - void prom_smp_finish(void) 106 + void __cpuinit prom_smp_finish(void) 107 107 { 108 108 #ifdef CONFIG_MIPS_MT_SMTC 109 109 smtc_smp_finish();
+3 -3
arch/mips/pmc-sierra/yosemite/smp.c
··· 77 77 * stack so the first thing we do is throw away that stuff and load useful 78 78 * values into the registers ... 79 79 */ 80 - void __init prom_boot_secondary(int cpu, struct task_struct *idle) 80 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 81 81 { 82 82 unsigned long gp = (unsigned long) task_thread_info(idle); 83 83 unsigned long sp = __KSTK_TOS(idle); ··· 97 97 * After we've done initial boot, this function is called to allow the 98 98 * board code to clean up state, if needed 99 99 */ 100 - void prom_init_secondary(void) 100 + void __cpuinit prom_init_secondary(void) 101 101 { 102 102 set_c0_status(ST0_CO | ST0_IE | ST0_IM); 103 103 } 104 104 105 - void prom_smp_finish(void) 105 + void __cpuinit prom_smp_finish(void) 106 106 { 107 107 } 108 108
+3 -3
arch/mips/qemu/q-smp.c
··· 22 22 * After we've done initial boot, this function is called to allow the 23 23 * board code to clean up state, if needed 24 24 */ 25 - void prom_init_secondary(void) 25 + void __cpuinit prom_init_secondary(void) 26 26 { 27 27 } 28 28 29 - void prom_smp_finish(void) 29 + void __cpuinit prom_smp_finish(void) 30 30 { 31 31 } 32 32 ··· 43 43 /* 44 44 * Firmware CPU startup hook 45 45 */ 46 - void prom_boot_secondary(int cpu, struct task_struct *idle) 46 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 47 47 { 48 48 } 49 49
+2 -2
arch/mips/sgi-ip27/ip27-smp.c
··· 171 171 * set sp to the kernel stack of the newly created idle process, gp to the proc 172 172 * struct so that current_thread_info() will work. 173 173 */ 174 - void __init prom_boot_secondary(int cpu, struct task_struct *idle) 174 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 175 175 { 176 176 unsigned long gp = (unsigned long)task_thread_info(idle); 177 177 unsigned long sp = __KSTK_TOS(idle); ··· 191 191 { 192 192 } 193 193 194 - void prom_smp_finish(void) 194 + void __cpuinit prom_smp_finish(void) 195 195 { 196 196 } 197 197
+3 -3
arch/mips/sibyte/cfe/smp.c
··· 58 58 * Setup the PC, SP, and GP of a secondary processor and start it 59 59 * running! 60 60 */ 61 - void prom_boot_secondary(int cpu, struct task_struct *idle) 61 + void __cpuinit prom_boot_secondary(int cpu, struct task_struct *idle) 62 62 { 63 63 int retval; 64 64 ··· 72 72 /* 73 73 * Code to run on secondary just after probing the CPU 74 74 */ 75 - void prom_init_secondary(void) 75 + void __cpuinit prom_init_secondary(void) 76 76 { 77 77 #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) 78 78 extern void bcm1480_smp_init(void); ··· 89 89 * Do any tidying up before marking online and running the idle 90 90 * loop 91 91 */ 92 - void prom_smp_finish(void) 92 + void __cpuinit prom_smp_finish(void) 93 93 { 94 94 #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) 95 95 extern void bcm1480_smp_finish(void);