diff mbox

powerpc: drop the cpu_bootable hook

Message ID 20141205154045.12630.60319.stgit@bahia.lab.toulouse-stg.fr.ibm.com (mailing list archive)
State Changes Requested
Delegated to: Michael Ellerman
Headers show

Commit Message

Greg Kurz Dec. 5, 2014, 3:42 p.m. UTC
All powerpc platforms share the same cpu_bootable hook, which does nothing
but { return 1 }. It is not needed anymore. Let's drop it at last.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---

v3: drop smp_generic_cpu_bootable() as well

I knew that posting a few minutes before leaving is bad idea on fridays... ;)

 arch/powerpc/include/asm/smp.h       |    1 -
 arch/powerpc/kernel/smp.c            |   14 +-------------
 arch/powerpc/platforms/85xx/smp.c    |    1 -
 arch/powerpc/platforms/cell/smp.c    |    1 -
 arch/powerpc/platforms/powernv/smp.c |    1 -
 arch/powerpc/platforms/pseries/smp.c |    1 -
 6 files changed, 1 insertion(+), 18 deletions(-)
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index fae8cad..76edb9c 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -50,7 +50,6 @@  struct smp_ops_t {
 	void  (*give_timebase)(void);
 	int   (*cpu_disable)(void);
 	void  (*cpu_die)(unsigned int nr);
-	int   (*cpu_bootable)(unsigned int nr);
 };
 
 extern void smp_send_debugger_break(void);
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 8d7f114..e8bd931 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -82,17 +82,6 @@  volatile unsigned int cpu_callin_map[NR_CPUS];
 
 static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
 
-/*
- * Returns 1 if the specified cpu should be brought up during boot.
- * Used to inhibit booting threads if they've been disabled or
- * limited on the command line
- */
-int smp_generic_cpu_bootable(unsigned int nr)
-{
-	return 1;
-}
-
-
 #ifdef CONFIG_PPC64
 int smp_generic_kick_cpu(int nr)
 {
@@ -489,8 +478,7 @@  int __cpu_up(unsigned int cpu, struct task_struct *tidle)
 	    cpu_thread_in_subcore(cpu))
 		return -EBUSY;
 
-	if (smp_ops == NULL ||
-	    (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)))
+	if (smp_ops == NULL)
 		return -EINVAL;
 
 	cpu_idle_thread_init(cpu, tidle);
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index d7c1e69..3aedc35 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -326,7 +326,6 @@  out:
 
 struct smp_ops_t smp_85xx_ops = {
 	.kick_cpu = smp_85xx_kick_cpu,
-	.cpu_bootable = smp_generic_cpu_bootable,
 #ifdef CONFIG_HOTPLUG_CPU
 	.cpu_disable	= generic_cpu_disable,
 	.cpu_die	= generic_cpu_die,
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index c8017a7..09f4eec 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -142,7 +142,6 @@  static struct smp_ops_t bpa_iic_smp_ops = {
 	.probe		= smp_iic_probe,
 	.kick_cpu	= smp_cell_kick_cpu,
 	.setup_cpu	= smp_cell_setup_cpu,
-	.cpu_bootable	= smp_generic_cpu_bootable,
 };
 
 /* This is called very early */
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 4753958..2e8a727 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -191,7 +191,6 @@  static struct smp_ops_t pnv_smp_ops = {
 	.probe		= xics_smp_probe,
 	.kick_cpu	= pnv_smp_kick_cpu,
 	.setup_cpu	= pnv_smp_setup_cpu,
-	.cpu_bootable	= smp_generic_cpu_bootable,
 #ifdef CONFIG_HOTPLUG_CPU
 	.cpu_disable	= pnv_smp_cpu_disable,
 	.cpu_die	= generic_cpu_die,
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index a3555b1..505a689 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -222,7 +222,6 @@  static struct smp_ops_t pSeries_xics_smp_ops = {
 	.probe		= pSeries_smp_probe,
 	.kick_cpu	= smp_pSeries_kick_cpu,
 	.setup_cpu	= smp_xics_setup_cpu,
-	.cpu_bootable	= smp_generic_cpu_bootable,
 };
 
 /* This is called very early */