diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-04 04:28:50 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-10 06:02:49 -0400 |
commit | a7f4ee1fe93aa9ae191971be9324edb8f9fbcb4a (patch) | |
tree | d462b76619518d4d35a1cadb026297c77c2f7816 | |
parent | 7261b956b276aa97fbf60d00f1d7717d2ea6ee78 (diff) |
powerpc: Drop return value of smp_ops->probe()
smp_ops->probe() is currently supposed to return the number of cpus in
the system.
The last actual usage of the value was removed in May 2007 in e147ec8f1808
"[POWERPC] Simplify smp_space_timers". We still passed the value around
until June 2010 when even that was finally removed in c1aa687d499a
"powerpc: Clean up obsolete code relating to decrementer and timebase".
So drop that requirement, probe() now returns void, and update all
implementations.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/include/asm/smp.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/xics.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/smp.c | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/smp.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/smp.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/smp.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/xics/xics-common.c | 4 |
8 files changed, 12 insertions, 29 deletions
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 7c19959cd705..825663c30945 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -42,7 +42,7 @@ struct smp_ops_t { | |||
42 | #ifdef CONFIG_PPC_SMP_MUXED_IPI | 42 | #ifdef CONFIG_PPC_SMP_MUXED_IPI |
43 | void (*cause_ipi)(int cpu, unsigned long data); | 43 | void (*cause_ipi)(int cpu, unsigned long data); |
44 | #endif | 44 | #endif |
45 | int (*probe)(void); | 45 | void (*probe)(void); |
46 | int (*kick_cpu)(int nr); | 46 | int (*kick_cpu)(int nr); |
47 | void (*setup_cpu)(int nr); | 47 | void (*setup_cpu)(int nr); |
48 | void (*bringup_done)(void); | 48 | void (*bringup_done)(void); |
@@ -174,7 +174,7 @@ static inline void set_hard_smp_processor_id(int cpu, int phys) | |||
174 | 174 | ||
175 | extern int smt_enabled_at_boot; | 175 | extern int smt_enabled_at_boot; |
176 | 176 | ||
177 | extern int smp_mpic_probe(void); | 177 | extern void smp_mpic_probe(void); |
178 | extern void smp_mpic_setup_cpu(int cpu); | 178 | extern void smp_mpic_setup_cpu(int cpu); |
179 | extern int smp_generic_kick_cpu(int nr); | 179 | extern int smp_generic_kick_cpu(int nr); |
180 | extern int smp_generic_cpu_bootable(unsigned int nr); | 180 | extern int smp_generic_cpu_bootable(unsigned int nr); |
diff --git a/arch/powerpc/include/asm/xics.h b/arch/powerpc/include/asm/xics.h index 6997f4a271df..0e25bdb190bb 100644 --- a/arch/powerpc/include/asm/xics.h +++ b/arch/powerpc/include/asm/xics.h | |||
@@ -146,7 +146,7 @@ extern void xics_update_irq_servers(void); | |||
146 | extern void xics_set_cpu_giq(unsigned int gserver, unsigned int join); | 146 | extern void xics_set_cpu_giq(unsigned int gserver, unsigned int join); |
147 | extern void xics_mask_unknown_vec(unsigned int vec); | 147 | extern void xics_mask_unknown_vec(unsigned int vec); |
148 | extern irqreturn_t xics_ipi_dispatch(int cpu); | 148 | extern irqreturn_t xics_ipi_dispatch(int cpu); |
149 | extern int xics_smp_probe(void); | 149 | extern void xics_smp_probe(void); |
150 | extern void xics_register_ics(struct ics *ics); | 150 | extern void xics_register_ics(struct ics *ics); |
151 | extern void xics_teardown_cpu(void); | 151 | extern void xics_teardown_cpu(void); |
152 | extern void xics_kexec_teardown_cpu(int secondary); | 152 | extern void xics_kexec_teardown_cpu(int secondary); |
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index b64e7ead752f..895560f4be69 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c | |||
@@ -102,13 +102,6 @@ static inline int smp_startup_cpu(unsigned int lcpu) | |||
102 | return 1; | 102 | return 1; |
103 | } | 103 | } |
104 | 104 | ||
105 | static int __init smp_iic_probe(void) | ||
106 | { | ||
107 | iic_request_IPIs(); | ||
108 | |||
109 | return num_possible_cpus(); | ||
110 | } | ||
111 | |||
112 | static void smp_cell_setup_cpu(int cpu) | 105 | static void smp_cell_setup_cpu(int cpu) |
113 | { | 106 | { |
114 | if (cpu != boot_cpuid) | 107 | if (cpu != boot_cpuid) |
@@ -139,7 +132,7 @@ static int smp_cell_kick_cpu(int nr) | |||
139 | 132 | ||
140 | static struct smp_ops_t bpa_iic_smp_ops = { | 133 | static struct smp_ops_t bpa_iic_smp_ops = { |
141 | .message_pass = iic_message_pass, | 134 | .message_pass = iic_message_pass, |
142 | .probe = smp_iic_probe, | 135 | .probe = iic_request_IPIs, |
143 | .kick_cpu = smp_cell_kick_cpu, | 136 | .kick_cpu = smp_cell_kick_cpu, |
144 | .setup_cpu = smp_cell_setup_cpu, | 137 | .setup_cpu = smp_cell_setup_cpu, |
145 | .cpu_bootable = smp_generic_cpu_bootable, | 138 | .cpu_bootable = smp_generic_cpu_bootable, |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index af094ae03dbb..f84ac7ee1107 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -268,7 +268,7 @@ static void __init psurge_quad_init(void) | |||
268 | mdelay(33); | 268 | mdelay(33); |
269 | } | 269 | } |
270 | 270 | ||
271 | static int __init smp_psurge_probe(void) | 271 | static void __init smp_psurge_probe(void) |
272 | { | 272 | { |
273 | int i, ncpus; | 273 | int i, ncpus; |
274 | struct device_node *dn; | 274 | struct device_node *dn; |
@@ -766,7 +766,7 @@ static void __init smp_core99_setup(int ncpus) | |||
766 | powersave_nap = 0; | 766 | powersave_nap = 0; |
767 | } | 767 | } |
768 | 768 | ||
769 | static int __init smp_core99_probe(void) | 769 | static void __init smp_core99_probe(void) |
770 | { | 770 | { |
771 | struct device_node *cpus; | 771 | struct device_node *cpus; |
772 | int ncpus = 0; | 772 | int ncpus = 0; |
@@ -781,7 +781,7 @@ static int __init smp_core99_probe(void) | |||
781 | 781 | ||
782 | /* Nothing more to do if less than 2 of them */ | 782 | /* Nothing more to do if less than 2 of them */ |
783 | if (ncpus <= 1) | 783 | if (ncpus <= 1) |
784 | return 1; | 784 | return; |
785 | 785 | ||
786 | /* We need to perform some early initialisations before we can start | 786 | /* We need to perform some early initialisations before we can start |
787 | * setting up SMP as we are running before initcalls | 787 | * setting up SMP as we are running before initcalls |
@@ -797,8 +797,6 @@ static int __init smp_core99_probe(void) | |||
797 | 797 | ||
798 | /* Collect l2cr and l3cr values from CPU 0 */ | 798 | /* Collect l2cr and l3cr values from CPU 0 */ |
799 | core99_init_caches(0); | 799 | core99_init_caches(0); |
800 | |||
801 | return ncpus; | ||
802 | } | 800 | } |
803 | 801 | ||
804 | static int smp_core99_kick_cpu(int nr) | 802 | static int smp_core99_kick_cpu(int nr) |
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c index b358bec6c8cb..3c7707af3384 100644 --- a/arch/powerpc/platforms/ps3/smp.c +++ b/arch/powerpc/platforms/ps3/smp.c | |||
@@ -57,7 +57,7 @@ static void ps3_smp_message_pass(int cpu, int msg) | |||
57 | " (%d)\n", __func__, __LINE__, cpu, msg, result); | 57 | " (%d)\n", __func__, __LINE__, cpu, msg, result); |
58 | } | 58 | } |
59 | 59 | ||
60 | static int __init ps3_smp_probe(void) | 60 | static void __init ps3_smp_probe(void) |
61 | { | 61 | { |
62 | int cpu; | 62 | int cpu; |
63 | 63 | ||
@@ -100,8 +100,6 @@ static int __init ps3_smp_probe(void) | |||
100 | 100 | ||
101 | DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu); | 101 | DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu); |
102 | } | 102 | } |
103 | |||
104 | return 2; | ||
105 | } | 103 | } |
106 | 104 | ||
107 | void ps3_smp_cleanup_cpu(int cpu) | 105 | void ps3_smp_cleanup_cpu(int cpu) |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index a3555b10c1a5..6932ea803e33 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -197,16 +197,14 @@ static void pSeries_cause_ipi_mux(int cpu, unsigned long data) | |||
197 | xics_cause_ipi(cpu, data); | 197 | xics_cause_ipi(cpu, data); |
198 | } | 198 | } |
199 | 199 | ||
200 | static __init int pSeries_smp_probe(void) | 200 | static __init void pSeries_smp_probe(void) |
201 | { | 201 | { |
202 | int ret = xics_smp_probe(); | 202 | xics_smp_probe(); |
203 | 203 | ||
204 | if (cpu_has_feature(CPU_FTR_DBELL)) { | 204 | if (cpu_has_feature(CPU_FTR_DBELL)) { |
205 | xics_cause_ipi = smp_ops->cause_ipi; | 205 | xics_cause_ipi = smp_ops->cause_ipi; |
206 | smp_ops->cause_ipi = pSeries_cause_ipi_mux; | 206 | smp_ops->cause_ipi = pSeries_cause_ipi_mux; |
207 | } | 207 | } |
208 | |||
209 | return ret; | ||
210 | } | 208 | } |
211 | 209 | ||
212 | static struct smp_ops_t pSeries_mpic_smp_ops = { | 210 | static struct smp_ops_t pSeries_mpic_smp_ops = { |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index fb19084c5860..b2b8447a227a 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -1897,7 +1897,7 @@ void smp_mpic_message_pass(int cpu, int msg) | |||
1897 | msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask); | 1897 | msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask); |
1898 | } | 1898 | } |
1899 | 1899 | ||
1900 | int __init smp_mpic_probe(void) | 1900 | void __init smp_mpic_probe(void) |
1901 | { | 1901 | { |
1902 | int nr_cpus; | 1902 | int nr_cpus; |
1903 | 1903 | ||
@@ -1909,8 +1909,6 @@ int __init smp_mpic_probe(void) | |||
1909 | 1909 | ||
1910 | if (nr_cpus > 1) | 1910 | if (nr_cpus > 1) |
1911 | mpic_request_ipis(); | 1911 | mpic_request_ipis(); |
1912 | |||
1913 | return nr_cpus; | ||
1914 | } | 1912 | } |
1915 | 1913 | ||
1916 | void smp_mpic_setup_cpu(int cpu) | 1914 | void smp_mpic_setup_cpu(int cpu) |
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 125743b58c70..878a54036a25 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c | |||
@@ -140,15 +140,13 @@ static void xics_request_ipi(void) | |||
140 | IRQF_PERCPU | IRQF_NO_THREAD, "IPI", NULL)); | 140 | IRQF_PERCPU | IRQF_NO_THREAD, "IPI", NULL)); |
141 | } | 141 | } |
142 | 142 | ||
143 | int __init xics_smp_probe(void) | 143 | void __init xics_smp_probe(void) |
144 | { | 144 | { |
145 | /* Setup cause_ipi callback based on which ICP is used */ | 145 | /* Setup cause_ipi callback based on which ICP is used */ |
146 | smp_ops->cause_ipi = icp_ops->cause_ipi; | 146 | smp_ops->cause_ipi = icp_ops->cause_ipi; |
147 | 147 | ||
148 | /* Register all the IPIs */ | 148 | /* Register all the IPIs */ |
149 | xics_request_ipi(); | 149 | xics_request_ipi(); |
150 | |||
151 | return num_possible_cpus(); | ||
152 | } | 150 | } |
153 | 151 | ||
154 | #endif /* CONFIG_SMP */ | 152 | #endif /* CONFIG_SMP */ |