diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-08-06 09:02:12 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-08-26 21:16:54 -0400 |
commit | 428ab280a0754656fa09304017b0ce626744cc77 (patch) | |
tree | 90b3973d6451701399c66ea252852bb7d34762a9 /arch/mips | |
parent | d98cc84dd11c126f85675dab8e2aebcbee114a90 (diff) |
[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>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/smp-mt.c | 6 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_smtc.c | 6 | ||||
-rw-r--r-- | arch/mips/mipssim/sim_smp.c | 6 | ||||
-rw-r--r-- | arch/mips/pmc-sierra/yosemite/smp.c | 6 | ||||
-rw-r--r-- | arch/mips/qemu/q-smp.c | 6 | ||||
-rw-r--r-- | arch/mips/sgi-ip27/ip27-smp.c | 4 | ||||
-rw-r--r-- | arch/mips/sibyte/cfe/smp.c | 6 |
7 files changed, 20 insertions, 20 deletions
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 19b30d6f1727..05dcce416325 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -287,7 +287,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
287 | * (unsigned long)idle->thread_info the gp | 287 | * (unsigned long)idle->thread_info the gp |
288 | * assumes a 1:1 mapping of TC => VPE | 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 | struct thread_info *gp = task_thread_info(idle); | 292 | struct thread_info *gp = task_thread_info(idle); |
293 | dvpe(); | 293 | dvpe(); |
@@ -321,7 +321,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle) | |||
321 | evpe(EVPE_ENABLE); | 321 | evpe(EVPE_ENABLE); |
322 | } | 322 | } |
323 | 323 | ||
324 | void prom_init_secondary(void) | 324 | void __cpuinit prom_init_secondary(void) |
325 | { | 325 | { |
326 | /* Enable per-cpu interrupts */ | 326 | /* Enable per-cpu interrupts */ |
327 | 327 | ||
@@ -330,7 +330,7 @@ void prom_init_secondary(void) | |||
330 | (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7)); | 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 | write_c0_compare(read_c0_count() + (8* mips_hpt_frequency/HZ)); | 335 | write_c0_compare(read_c0_count() + (8* mips_hpt_frequency/HZ)); |
336 | 336 | ||
diff --git a/arch/mips/mips-boards/malta/malta_smtc.c b/arch/mips/mips-boards/malta/malta_smtc.c index ea8f3bb8ed81..40d782d7d37f 100644 --- a/arch/mips/mips-boards/malta/malta_smtc.c +++ b/arch/mips/mips-boards/malta/malta_smtc.c | |||
@@ -24,7 +24,7 @@ void core_send_ipi(int cpu, unsigned int action) | |||
24 | * Platform "CPU" startup hook | 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 | smtc_boot_secondary(cpu, idle); | 29 | smtc_boot_secondary(cpu, idle); |
30 | } | 30 | } |
@@ -33,7 +33,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle) | |||
33 | * Post-config but pre-boot cleanup entry point | 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 | void smtc_init_secondary(void); | 38 | void smtc_init_secondary(void); |
39 | int myvpe; | 39 | int myvpe; |
@@ -75,7 +75,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
75 | * SMP initialization finalization entry point | 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 | smtc_smp_finish(); | 80 | smtc_smp_finish(); |
81 | } | 81 | } |
diff --git a/arch/mips/mipssim/sim_smp.c b/arch/mips/mipssim/sim_smp.c index 38fa807b99f9..ccbbccac23ef 100644 --- a/arch/mips/mipssim/sim_smp.c +++ b/arch/mips/mipssim/sim_smp.c | |||
@@ -53,7 +53,7 @@ void core_send_ipi(int cpu, unsigned int action) | |||
53 | * Platform "CPU" startup hook | 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 | #ifdef CONFIG_MIPS_MT_SMTC | 58 | #ifdef CONFIG_MIPS_MT_SMTC |
59 | smtc_boot_secondary(cpu, idle); | 59 | smtc_boot_secondary(cpu, idle); |
@@ -64,7 +64,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle) | |||
64 | * Post-config but pre-boot cleanup entry point | 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 | #ifdef CONFIG_MIPS_MT_SMTC | 69 | #ifdef CONFIG_MIPS_MT_SMTC |
70 | void smtc_init_secondary(void); | 70 | void smtc_init_secondary(void); |
@@ -103,7 +103,7 @@ void plat_prepare_cpus(unsigned int max_cpus) | |||
103 | * SMP initialization finalization entry point | 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 | #ifdef CONFIG_MIPS_MT_SMTC | 108 | #ifdef CONFIG_MIPS_MT_SMTC |
109 | smtc_smp_finish(); | 109 | smtc_smp_finish(); |
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c index 1c852d6a7654..b0f12cd2968a 100644 --- a/arch/mips/pmc-sierra/yosemite/smp.c +++ b/arch/mips/pmc-sierra/yosemite/smp.c | |||
@@ -77,7 +77,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
77 | * stack so the first thing we do is throw away that stuff and load useful | 77 | * stack so the first thing we do is throw away that stuff and load useful |
78 | * values into the registers ... | 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 | unsigned long gp = (unsigned long) task_thread_info(idle); | 82 | unsigned long gp = (unsigned long) task_thread_info(idle); |
83 | unsigned long sp = __KSTK_TOS(idle); | 83 | unsigned long sp = __KSTK_TOS(idle); |
@@ -97,12 +97,12 @@ void prom_cpus_done(void) | |||
97 | * After we've done initial boot, this function is called to allow the | 97 | * After we've done initial boot, this function is called to allow the |
98 | * board code to clean up state, if needed | 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 | set_c0_status(ST0_CO | ST0_IE | ST0_IM); | 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 | ||
diff --git a/arch/mips/qemu/q-smp.c b/arch/mips/qemu/q-smp.c index 786bbfa214d1..4b0178d0df0b 100644 --- a/arch/mips/qemu/q-smp.c +++ b/arch/mips/qemu/q-smp.c | |||
@@ -22,11 +22,11 @@ void core_send_ipi(int cpu, unsigned int action) | |||
22 | * After we've done initial boot, this function is called to allow the | 22 | * After we've done initial boot, this function is called to allow the |
23 | * board code to clean up state, if needed | 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,7 +43,7 @@ void __init prom_prepare_cpus(unsigned int max_cpus) | |||
43 | /* | 43 | /* |
44 | * Firmware CPU startup hook | 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 | ||
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c index 08e79141b47c..fbb27728a76a 100644 --- a/arch/mips/sgi-ip27/ip27-smp.c +++ b/arch/mips/sgi-ip27/ip27-smp.c | |||
@@ -171,7 +171,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
171 | * set sp to the kernel stack of the newly created idle process, gp to the proc | 171 | * set sp to the kernel stack of the newly created idle process, gp to the proc |
172 | * struct so that current_thread_info() will work. | 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 | unsigned long gp = (unsigned long)task_thread_info(idle); | 176 | unsigned long gp = (unsigned long)task_thread_info(idle); |
177 | unsigned long sp = __KSTK_TOS(idle); | 177 | unsigned long sp = __KSTK_TOS(idle); |
@@ -191,7 +191,7 @@ void __init prom_cpus_done(void) | |||
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 | ||
diff --git a/arch/mips/sibyte/cfe/smp.c b/arch/mips/sibyte/cfe/smp.c index eab20e2db323..5de4cff9d14a 100644 --- a/arch/mips/sibyte/cfe/smp.c +++ b/arch/mips/sibyte/cfe/smp.c | |||
@@ -58,7 +58,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
58 | * Setup the PC, SP, and GP of a secondary processor and start it | 58 | * Setup the PC, SP, and GP of a secondary processor and start it |
59 | * running! | 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 | int retval; | 63 | int retval; |
64 | 64 | ||
@@ -72,7 +72,7 @@ void prom_boot_secondary(int cpu, struct task_struct *idle) | |||
72 | /* | 72 | /* |
73 | * Code to run on secondary just after probing the CPU | 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 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | 77 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) |
78 | extern void bcm1480_smp_init(void); | 78 | extern void bcm1480_smp_init(void); |
@@ -89,7 +89,7 @@ void prom_init_secondary(void) | |||
89 | * Do any tidying up before marking online and running the idle | 89 | * Do any tidying up before marking online and running the idle |
90 | * loop | 90 | * loop |
91 | */ | 91 | */ |
92 | void prom_smp_finish(void) | 92 | void __cpuinit prom_smp_finish(void) |
93 | { | 93 | { |
94 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | 94 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) |
95 | extern void bcm1480_smp_finish(void); | 95 | extern void bcm1480_smp_finish(void); |