powerpc: Move iSeries_smp.c to powerpc/platforms/iseries
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2005 17:07:14 +0000 (03:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2005 17:07:14 +0000 (03:07 +1000)
And rename it to smp.c.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/powerpc/platforms/iseries/Makefile
arch/powerpc/platforms/iseries/smp.c [new file with mode: 0644]
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/iSeries_smp.c [deleted file]

index 3a1ed16963a4332c1f882f3012c2ecd9be92bb2e..202f17419df55c462c70bec9678882147015c159 100644 (file)
@@ -2,3 +2,4 @@ obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
        hvcall.o proc.o htab.o iommu.o
 obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o
 obj-$(CONFIG_IBMVIO) += vio.o
+obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c
new file mode 100644 (file)
index 0000000..f720916
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * SMP support for iSeries machines.
+ *
+ * Dave Engebretsen, Peter Bergner, and
+ * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com
+ *
+ * Plus various changes from other IBM teams...
+ *
+ *      This program is free software; you can redistribute it and/or
+ *      modify it under the terms of the GNU General Public License
+ *      as published by the Free Software Foundation; either version
+ *      2 of the License, or (at your option) any later version.
+ */
+
+#undef DEBUG
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
+#include <linux/kernel_stat.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/cache.h>
+#include <linux/err.h>
+#include <linux/sysdev.h>
+#include <linux/cpu.h>
+
+#include <asm/ptrace.h>
+#include <asm/atomic.h>
+#include <asm/irq.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/io.h>
+#include <asm/smp.h>
+#include <asm/paca.h>
+#include <asm/iSeries/HvCall.h>
+#include <asm/time.h>
+#include <asm/ppcdebug.h>
+#include <asm/machdep.h>
+#include <asm/cputable.h>
+#include <asm/system.h>
+
+static unsigned long iSeries_smp_message[NR_CPUS];
+
+void iSeries_smp_message_recv(struct pt_regs *regs)
+{
+       int cpu = smp_processor_id();
+       int msg;
+
+       if (num_online_cpus() < 2)
+               return;
+
+       for (msg = 0; msg < 4; msg++)
+               if (test_and_clear_bit(msg, &iSeries_smp_message[cpu]))
+                       smp_message_recv(msg, regs);
+}
+
+static inline void smp_iSeries_do_message(int cpu, int msg)
+{
+       set_bit(msg, &iSeries_smp_message[cpu]);
+       HvCall_sendIPI(&(paca[cpu]));
+}
+
+static void smp_iSeries_message_pass(int target, int msg)
+{
+       int i;
+
+       if (target < NR_CPUS)
+               smp_iSeries_do_message(target, msg);
+       else {
+               for_each_online_cpu(i) {
+                       if ((target == MSG_ALL_BUT_SELF) &&
+                                       (i == smp_processor_id()))
+                               continue;
+                       smp_iSeries_do_message(i, msg);
+               }
+       }
+}
+
+static int smp_iSeries_probe(void)
+{
+       return cpus_weight(cpu_possible_map);
+}
+
+static void smp_iSeries_kick_cpu(int nr)
+{
+       BUG_ON((nr < 0) || (nr >= NR_CPUS));
+
+       /* Verify that our partition has a processor nr */
+       if (paca[nr].lppaca.dyn_proc_status >= 2)
+               return;
+
+       /* The processor is currently spinning, waiting
+        * for the cpu_start field to become non-zero
+        * After we set cpu_start, the processor will
+        * continue on to secondary_start in iSeries_head.S
+        */
+       paca[nr].cpu_start = 1;
+}
+
+static void __devinit smp_iSeries_setup_cpu(int nr)
+{
+}
+
+static struct smp_ops_t iSeries_smp_ops = {
+       .message_pass = smp_iSeries_message_pass,
+       .probe        = smp_iSeries_probe,
+       .kick_cpu     = smp_iSeries_kick_cpu,
+       .setup_cpu    = smp_iSeries_setup_cpu,
+};
+
+/* This is called very early. */
+void __init smp_init_iSeries(void)
+{
+       smp_ops = &iSeries_smp_ops;
+}
index 7354c1dbe9f01109a82aeace4ed8fa9c38908fd4..ee88fca0c886e7493877c964c03787b501eab154 100644 (file)
@@ -60,7 +60,6 @@ obj-$(CONFIG_U3_DART)         += u3_iommu.o
 
 ifdef CONFIG_SMP
 obj-$(CONFIG_PPC_PMAC)         += pmac_smp.o smp-tbsync.o
-obj-$(CONFIG_PPC_ISERIES)      += iSeries_smp.o
 obj-$(CONFIG_PPC_PSERIES)      += pSeries_smp.o
 obj-$(CONFIG_PPC_BPA)          += pSeries_smp.o
 obj-$(CONFIG_PPC_MAPLE)                += smp-tbsync.o
diff --git a/arch/ppc64/kernel/iSeries_smp.c b/arch/ppc64/kernel/iSeries_smp.c
deleted file mode 100644 (file)
index f982e5b..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * SMP support for iSeries machines.
- *
- * Dave Engebretsen, Peter Bergner, and
- * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com
- *
- * Plus various changes from other IBM teams...
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-
-#undef DEBUG
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
-#include <linux/interrupt.h>
-#include <linux/kernel_stat.h>
-#include <linux/delay.h>
-#include <linux/init.h>
-#include <linux/spinlock.h>
-#include <linux/cache.h>
-#include <linux/err.h>
-#include <linux/sysdev.h>
-#include <linux/cpu.h>
-
-#include <asm/ptrace.h>
-#include <asm/atomic.h>
-#include <asm/irq.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/io.h>
-#include <asm/smp.h>
-#include <asm/paca.h>
-#include <asm/iSeries/HvCall.h>
-#include <asm/time.h>
-#include <asm/ppcdebug.h>
-#include <asm/machdep.h>
-#include <asm/cputable.h>
-#include <asm/system.h>
-
-static unsigned long iSeries_smp_message[NR_CPUS];
-
-void iSeries_smp_message_recv( struct pt_regs * regs )
-{
-       int cpu = smp_processor_id();
-       int msg;
-
-       if ( num_online_cpus() < 2 )
-               return;
-
-       for ( msg = 0; msg < 4; ++msg )
-               if ( test_and_clear_bit( msg, &iSeries_smp_message[cpu] ) )
-                       smp_message_recv( msg, regs );
-}
-
-static inline void smp_iSeries_do_message(int cpu, int msg)
-{
-       set_bit(msg, &iSeries_smp_message[cpu]);
-       HvCall_sendIPI(&(paca[cpu]));
-}
-
-static void smp_iSeries_message_pass(int target, int msg)
-{
-       int i;
-
-       if (target < NR_CPUS)
-               smp_iSeries_do_message(target, msg);
-       else {
-               for_each_online_cpu(i) {
-                       if (target == MSG_ALL_BUT_SELF
-                           && i == smp_processor_id())
-                               continue;
-                       smp_iSeries_do_message(i, msg);
-               }
-       }
-}
-
-static int smp_iSeries_probe(void)
-{
-       return cpus_weight(cpu_possible_map);
-}
-
-static void smp_iSeries_kick_cpu(int nr)
-{
-       BUG_ON(nr < 0 || nr >= NR_CPUS);
-
-       /* Verify that our partition has a processor nr */
-       if (paca[nr].lppaca.dyn_proc_status >= 2)
-               return;
-
-       /* The processor is currently spinning, waiting
-        * for the cpu_start field to become non-zero
-        * After we set cpu_start, the processor will
-        * continue on to secondary_start in iSeries_head.S
-        */
-       paca[nr].cpu_start = 1;
-}
-
-static void __devinit smp_iSeries_setup_cpu(int nr)
-{
-}
-
-static struct smp_ops_t iSeries_smp_ops = {
-       .message_pass = smp_iSeries_message_pass,
-       .probe        = smp_iSeries_probe,
-       .kick_cpu     = smp_iSeries_kick_cpu,
-       .setup_cpu    = smp_iSeries_setup_cpu,
-};
-
-/* This is called very early. */
-void __init smp_init_iSeries(void)
-{
-       smp_ops = &iSeries_smp_ops;
-}