Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7f4ee1f authored by Michael Ellerman's avatar Michael Ellerman
Browse files

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 e147ec8f
"[POWERPC] Simplify smp_space_timers". We still passed the value around
until June 2010 when even that was finally removed in c1aa687d
"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: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 7261b956
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −8
Original line number Diff line number Diff line
@@ -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,
+3 −5
Original line number Diff line number Diff line
@@ -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)
+1 −3
Original line number Diff line number Diff line
@@ -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)
Loading