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 ine147ec8f18
"[POWERPC] Simplify smp_space_timers". We still passed the value around until June 2010 when even that was finally removed inc1aa687d49
"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>
This commit is contained in:
parent
7261b956b2
commit
a7f4ee1fe9
|
@ -42,7 +42,7 @@ struct smp_ops_t {
|
|||
#ifdef CONFIG_PPC_SMP_MUXED_IPI
|
||||
void (*cause_ipi)(int cpu, unsigned long data);
|
||||
#endif
|
||||
int (*probe)(void);
|
||||
void (*probe)(void);
|
||||
int (*kick_cpu)(int nr);
|
||||
void (*setup_cpu)(int nr);
|
||||
void (*bringup_done)(void);
|
||||
|
@ -174,7 +174,7 @@ static inline void set_hard_smp_processor_id(int cpu, int phys)
|
|||
|
||||
extern int smt_enabled_at_boot;
|
||||
|
||||
extern int smp_mpic_probe(void);
|
||||
extern void smp_mpic_probe(void);
|
||||
extern void smp_mpic_setup_cpu(int cpu);
|
||||
extern int smp_generic_kick_cpu(int nr);
|
||||
extern int smp_generic_cpu_bootable(unsigned int nr);
|
||||
|
|
|
@ -146,7 +146,7 @@ extern void xics_update_irq_servers(void);
|
|||
extern void xics_set_cpu_giq(unsigned int gserver, unsigned int join);
|
||||
extern void xics_mask_unknown_vec(unsigned int vec);
|
||||
extern irqreturn_t xics_ipi_dispatch(int cpu);
|
||||
extern int xics_smp_probe(void);
|
||||
extern void xics_smp_probe(void);
|
||||
extern void xics_register_ics(struct ics *ics);
|
||||
extern void xics_teardown_cpu(void);
|
||||
extern void xics_kexec_teardown_cpu(int secondary);
|
||||
|
|
|
@ -102,13 +102,6 @@ static inline int smp_startup_cpu(unsigned int lcpu)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int __init smp_iic_probe(void)
|
||||
{
|
||||
iic_request_IPIs();
|
||||
|
||||
return num_possible_cpus();
|
||||
}
|
||||
|
||||
static void smp_cell_setup_cpu(int cpu)
|
||||
{
|
||||
if (cpu != boot_cpuid)
|
||||
|
@ -139,7 +132,7 @@ static int smp_cell_kick_cpu(int nr)
|
|||
|
||||
static struct smp_ops_t bpa_iic_smp_ops = {
|
||||
.message_pass = iic_message_pass,
|
||||
.probe = smp_iic_probe,
|
||||
.probe = iic_request_IPIs,
|
||||
.kick_cpu = smp_cell_kick_cpu,
|
||||
.setup_cpu = smp_cell_setup_cpu,
|
||||
.cpu_bootable = smp_generic_cpu_bootable,
|
||||
|
|
|
@ -268,7 +268,7 @@ static void __init psurge_quad_init(void)
|
|||
mdelay(33);
|
||||
}
|
||||
|
||||
static int __init smp_psurge_probe(void)
|
||||
static void __init smp_psurge_probe(void)
|
||||
{
|
||||
int i, ncpus;
|
||||
struct device_node *dn;
|
||||
|
@ -766,7 +766,7 @@ static void __init smp_core99_setup(int ncpus)
|
|||
powersave_nap = 0;
|
||||
}
|
||||
|
||||
static int __init smp_core99_probe(void)
|
||||
static void __init smp_core99_probe(void)
|
||||
{
|
||||
struct device_node *cpus;
|
||||
int ncpus = 0;
|
||||
|
@ -781,7 +781,7 @@ static int __init smp_core99_probe(void)
|
|||
|
||||
/* Nothing more to do if less than 2 of them */
|
||||
if (ncpus <= 1)
|
||||
return 1;
|
||||
return;
|
||||
|
||||
/* We need to perform some early initialisations before we can start
|
||||
* setting up SMP as we are running before initcalls
|
||||
|
@ -797,8 +797,6 @@ static int __init smp_core99_probe(void)
|
|||
|
||||
/* Collect l2cr and l3cr values from CPU 0 */
|
||||
core99_init_caches(0);
|
||||
|
||||
return ncpus;
|
||||
}
|
||||
|
||||
static int smp_core99_kick_cpu(int nr)
|
||||
|
|
|
@ -57,7 +57,7 @@ static void ps3_smp_message_pass(int cpu, int msg)
|
|||
" (%d)\n", __func__, __LINE__, cpu, msg, result);
|
||||
}
|
||||
|
||||
static int __init ps3_smp_probe(void)
|
||||
static void __init ps3_smp_probe(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
|
@ -100,8 +100,6 @@ static int __init ps3_smp_probe(void)
|
|||
|
||||
DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu);
|
||||
}
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
void ps3_smp_cleanup_cpu(int cpu)
|
||||
|
|
|
@ -197,16 +197,14 @@ static void pSeries_cause_ipi_mux(int cpu, unsigned long data)
|
|||
xics_cause_ipi(cpu, data);
|
||||
}
|
||||
|
||||
static __init int pSeries_smp_probe(void)
|
||||
static __init void pSeries_smp_probe(void)
|
||||
{
|
||||
int ret = xics_smp_probe();
|
||||
xics_smp_probe();
|
||||
|
||||
if (cpu_has_feature(CPU_FTR_DBELL)) {
|
||||
xics_cause_ipi = smp_ops->cause_ipi;
|
||||
smp_ops->cause_ipi = pSeries_cause_ipi_mux;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct smp_ops_t pSeries_mpic_smp_ops = {
|
||||
|
|
|
@ -1897,7 +1897,7 @@ void smp_mpic_message_pass(int cpu, int msg)
|
|||
msg * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), physmask);
|
||||
}
|
||||
|
||||
int __init smp_mpic_probe(void)
|
||||
void __init smp_mpic_probe(void)
|
||||
{
|
||||
int nr_cpus;
|
||||
|
||||
|
@ -1909,8 +1909,6 @@ int __init smp_mpic_probe(void)
|
|||
|
||||
if (nr_cpus > 1)
|
||||
mpic_request_ipis();
|
||||
|
||||
return nr_cpus;
|
||||
}
|
||||
|
||||
void smp_mpic_setup_cpu(int cpu)
|
||||
|
|
|
@ -140,15 +140,13 @@ static void xics_request_ipi(void)
|
|||
IRQF_PERCPU | IRQF_NO_THREAD, "IPI", NULL));
|
||||
}
|
||||
|
||||
int __init xics_smp_probe(void)
|
||||
void __init xics_smp_probe(void)
|
||||
{
|
||||
/* Setup cause_ipi callback based on which ICP is used */
|
||||
smp_ops->cause_ipi = icp_ops->cause_ipi;
|
||||
|
||||
/* Register all the IPIs */
|
||||
xics_request_ipi();
|
||||
|
||||
return num_possible_cpus();
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
|
Loading…
Reference in New Issue