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

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>

+12 -29
+2 -2
arch/powerpc/include/asm/smp.h
··· 42 42 #ifdef CONFIG_PPC_SMP_MUXED_IPI 43 43 void (*cause_ipi)(int cpu, unsigned long data); 44 44 #endif 45 - int (*probe)(void); 45 + void (*probe)(void); 46 46 int (*kick_cpu)(int nr); 47 47 void (*setup_cpu)(int nr); 48 48 void (*bringup_done)(void); ··· 174 174 175 175 extern int smt_enabled_at_boot; 176 176 177 - extern int smp_mpic_probe(void); 177 + extern void smp_mpic_probe(void); 178 178 extern void smp_mpic_setup_cpu(int cpu); 179 179 extern int smp_generic_kick_cpu(int nr); 180 180 extern int smp_generic_cpu_bootable(unsigned int nr);
+1 -1
arch/powerpc/include/asm/xics.h
··· 146 146 extern void xics_set_cpu_giq(unsigned int gserver, unsigned int join); 147 147 extern void xics_mask_unknown_vec(unsigned int vec); 148 148 extern irqreturn_t xics_ipi_dispatch(int cpu); 149 - extern int xics_smp_probe(void); 149 + extern void xics_smp_probe(void); 150 150 extern void xics_register_ics(struct ics *ics); 151 151 extern void xics_teardown_cpu(void); 152 152 extern void xics_kexec_teardown_cpu(int secondary);
+1 -8
arch/powerpc/platforms/cell/smp.c
··· 102 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 105 static void smp_cell_setup_cpu(int cpu) 113 106 { 114 107 if (cpu != boot_cpuid) ··· 132 139 133 140 static struct smp_ops_t bpa_iic_smp_ops = { 134 141 .message_pass = iic_message_pass, 135 - .probe = smp_iic_probe, 142 + .probe = iic_request_IPIs, 136 143 .kick_cpu = smp_cell_kick_cpu, 137 144 .setup_cpu = smp_cell_setup_cpu, 138 145 .cpu_bootable = smp_generic_cpu_bootable,
+3 -5
arch/powerpc/platforms/powermac/smp.c
··· 268 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 273 int i, ncpus; 274 274 struct device_node *dn; ··· 766 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 771 struct device_node *cpus; 772 772 int ncpus = 0; ··· 781 781 782 782 /* Nothing more to do if less than 2 of them */ 783 783 if (ncpus <= 1) 784 - return 1; 784 + return; 785 785 786 786 /* We need to perform some early initialisations before we can start 787 787 * setting up SMP as we are running before initcalls ··· 797 797 798 798 /* Collect l2cr and l3cr values from CPU 0 */ 799 799 core99_init_caches(0); 800 - 801 - return ncpus; 802 800 } 803 801 804 802 static int smp_core99_kick_cpu(int nr)
+1 -3
arch/powerpc/platforms/ps3/smp.c
··· 57 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 62 int cpu; 63 63 ··· 100 100 101 101 DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu); 102 102 } 103 - 104 - return 2; 105 103 } 106 104 107 105 void ps3_smp_cleanup_cpu(int cpu)
+2 -4
arch/powerpc/platforms/pseries/smp.c
··· 197 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 204 if (cpu_has_feature(CPU_FTR_DBELL)) { 205 205 xics_cause_ipi = smp_ops->cause_ipi; 206 206 smp_ops->cause_ipi = pSeries_cause_ipi_mux; 207 207 } 208 - 209 - return ret; 210 208 } 211 209 212 210 static struct smp_ops_t pSeries_mpic_smp_ops = {
+1 -3
arch/powerpc/sysdev/mpic.c
··· 1897 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 1902 int nr_cpus; 1903 1903 ··· 1909 1909 1910 1910 if (nr_cpus > 1) 1911 1911 mpic_request_ipis(); 1912 - 1913 - return nr_cpus; 1914 1912 } 1915 1913 1916 1914 void smp_mpic_setup_cpu(int cpu)
+1 -3
arch/powerpc/sysdev/xics/xics-common.c
··· 140 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 145 /* Setup cause_ipi callback based on which ICP is used */ 146 146 smp_ops->cause_ipi = icp_ops->cause_ipi; 147 147 148 148 /* Register all the IPIs */ 149 149 xics_request_ipi(); 150 - 151 - return num_possible_cpus(); 152 150 } 153 151 154 152 #endif /* CONFIG_SMP */