powerpc: move more iSeries code
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 28 Sep 2005 03:28:01 +0000 (13:28 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 28 Sep 2005 03:28:01 +0000 (13:28 +1000)
Move the iSeries specific parts of misc.S and ppc_ksyms.c
into powerpc/platforms/iseries.

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

index 5a27b888103c4cc5cbb46fbf45d76298006561a6..18bf4007756105cdbe023a022fe8b1a9c39475f8 100644 (file)
@@ -1,6 +1,7 @@
 obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
-       hvcall.o proc.o htab.o iommu.o
+       hvcall.o proc.o htab.o iommu.o misc.o
 obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o
 obj-$(CONFIG_IBMVIO) += vio.o
 obj-$(CONFIG_SMP) += smp.o
 obj-$(CONFIG_VIOPATH) += viopath.o
+obj-$(CONFIG_MODULES) += ksyms.o
diff --git a/arch/powerpc/platforms/iseries/ksyms.c b/arch/powerpc/platforms/iseries/ksyms.c
new file mode 100644 (file)
index 0000000..f271b35
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * (C) 2001-2005 PPC 64 Team, IBM Corp
+ *
+ *      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.
+ */
+#include <linux/module.h>
+
+#include <asm/hw_irq.h>
+#include <asm/iSeries/HvCallSc.h>
+
+EXPORT_SYMBOL(HvCall0);
+EXPORT_SYMBOL(HvCall1);
+EXPORT_SYMBOL(HvCall2);
+EXPORT_SYMBOL(HvCall3);
+EXPORT_SYMBOL(HvCall4);
+EXPORT_SYMBOL(HvCall5);
+EXPORT_SYMBOL(HvCall6);
+EXPORT_SYMBOL(HvCall7);
+
+#ifdef CONFIG_SMP
+EXPORT_SYMBOL(local_get_flags);
+EXPORT_SYMBOL(local_irq_disable);
+EXPORT_SYMBOL(local_irq_restore);
+#endif
diff --git a/arch/powerpc/platforms/iseries/misc.S b/arch/powerpc/platforms/iseries/misc.S
new file mode 100644 (file)
index 0000000..09f1452
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * This file contains miscellaneous low-level functions.
+ *    Copyright (C) 1995-2005 IBM Corp
+ *
+ * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
+ * and Paul Mackerras.
+ * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
+ * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
+ *
+ * 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.
+ */
+
+#include <asm/processor.h>
+#include <asm/asm-offsets.h>
+
+       .text
+
+/* unsigned long local_save_flags(void) */
+_GLOBAL(local_get_flags)
+       lbz     r3,PACAPROCENABLED(r13)
+       blr
+
+/* unsigned long local_irq_disable(void) */
+_GLOBAL(local_irq_disable)
+       lbz     r3,PACAPROCENABLED(r13)
+       li      r4,0
+       stb     r4,PACAPROCENABLED(r13)
+       blr                     /* Done */
+
+/* void local_irq_restore(unsigned long flags) */
+_GLOBAL(local_irq_restore)
+       lbz     r5,PACAPROCENABLED(r13)
+        /* Check if things are setup the way we want _already_. */
+       cmpw    0,r3,r5
+       beqlr
+       /* are we enabling interrupts? */
+       cmpdi   0,r3,0
+       stb     r3,PACAPROCENABLED(r13)
+       beqlr
+       /* Check pending interrupts */
+       /*   A decrementer, IPI or PMC interrupt may have occurred
+        *   while we were in the hypervisor (which enables) */
+       ld      r4,PACALPPACA+LPPACAANYINT(r13)
+       cmpdi   r4,0
+       beqlr
+
+       /*
+        * Handle pending interrupts in interrupt context
+        */
+       li      r0,0x5555
+       sc
+       blr
index a25b59759ddbc8e7da8d6fa6aaddb7048b502b86..d069bbd7f81f97f401ae6a39beae5c1912ca16fa 100644 (file)
@@ -64,44 +64,6 @@ _GLOBAL(get_srr1)
 _GLOBAL(get_sp)
        mr      r3,r1
        blr
-               
-#ifdef CONFIG_PPC_ISERIES
-/* unsigned long local_save_flags(void) */
-_GLOBAL(local_get_flags)
-       lbz     r3,PACAPROCENABLED(r13)
-       blr
-
-/* unsigned long local_irq_disable(void) */
-_GLOBAL(local_irq_disable)
-       lbz     r3,PACAPROCENABLED(r13)
-       li      r4,0
-       stb     r4,PACAPROCENABLED(r13)
-       blr                     /* Done */
-
-/* void local_irq_restore(unsigned long flags) */      
-_GLOBAL(local_irq_restore)
-       lbz     r5,PACAPROCENABLED(r13)
-        /* Check if things are setup the way we want _already_. */
-       cmpw    0,r3,r5
-       beqlr
-       /* are we enabling interrupts? */
-       cmpdi   0,r3,0
-       stb     r3,PACAPROCENABLED(r13)
-       beqlr
-       /* Check pending interrupts */
-       /*   A decrementer, IPI or PMC interrupt may have occurred
-        *   while we were in the hypervisor (which enables) */
-       ld      r4,PACALPPACA+LPPACAANYINT(r13)
-       cmpdi   r4,0
-       beqlr
-
-       /*
-        * Handle pending interrupts in interrupt context
-        */
-       li      r0,0x5555
-       sc
-       blr
-#endif /* CONFIG_PPC_ISERIES */
 
 #ifdef CONFIG_IRQSTACKS
 _GLOBAL(call_do_softirq)
index 705742f4eec6074531f469fb5885a410d173b14c..84006e26342c15f8a15effad5f2e208b2712339c 100644 (file)
@@ -19,7 +19,6 @@
 #include <asm/hw_irq.h>
 #include <asm/abs_addr.h>
 #include <asm/cacheflush.h>
-#include <asm/iSeries/HvCallSc.h>
 
 EXPORT_SYMBOL(strcpy);
 EXPORT_SYMBOL(strncpy);
@@ -46,17 +45,6 @@ EXPORT_SYMBOL(__strnlen_user);
 
 EXPORT_SYMBOL(reloc_offset);
 
-#ifdef CONFIG_PPC_ISERIES
-EXPORT_SYMBOL(HvCall0);
-EXPORT_SYMBOL(HvCall1);
-EXPORT_SYMBOL(HvCall2);
-EXPORT_SYMBOL(HvCall3);
-EXPORT_SYMBOL(HvCall4);
-EXPORT_SYMBOL(HvCall5);
-EXPORT_SYMBOL(HvCall6);
-EXPORT_SYMBOL(HvCall7);
-#endif
-
 EXPORT_SYMBOL(_insb);
 EXPORT_SYMBOL(_outsb);
 EXPORT_SYMBOL(_insw);
@@ -77,14 +65,6 @@ EXPORT_SYMBOL(giveup_altivec);
 EXPORT_SYMBOL(__flush_icache_range);
 EXPORT_SYMBOL(flush_dcache_range);
 
-#ifdef CONFIG_SMP
-#ifdef CONFIG_PPC_ISERIES
-EXPORT_SYMBOL(local_get_flags);
-EXPORT_SYMBOL(local_irq_disable);
-EXPORT_SYMBOL(local_irq_restore);
-#endif
-#endif
-
 EXPORT_SYMBOL(memcpy);
 EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(memmove);