]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: Move xics.[ch] into platforms/pseries
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 28 Oct 2005 05:35:50 +0000 (15:35 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 28 Oct 2005 06:39:19 +0000 (16:39 +1000)
This patch moves the XICS interrupt controller code into the
platforms/pseries directory, since it only appears on pSeries
machines.  If it ever appears on some other machine we can move it to
sysdev, although xics.c itself will need a bunch of changes in that
case to remove pSeries specific assumptions.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/smp.c
arch/powerpc/platforms/pseries/xics.c [moved from arch/ppc64/kernel/xics.c with 98% similarity]
arch/powerpc/platforms/pseries/xics.h [moved from include/asm-ppc64/xics.h with 84% similarity]
arch/ppc64/kernel/Makefile

index d5c160b789e38b2cd321dd05029e716d33678d24..5ef494e3a70f797cf507072b4e1527f1033a169e 100644 (file)
@@ -2,3 +2,4 @@ obj-y                   := pci.o lpar.o hvCall.o nvram.o reconfig.o \
                           setup.o iommu.o rtas-fw.o ras.o
 obj-$(CONFIG_SMP)      += smp.o
 obj-$(CONFIG_IBMVIO)   += vio.o
+obj-$(CONFIG_XICS)     += xics.o
index 7e7e556e6b48dad39019bbd20be6428cba8b617c..10cb0f2d9b5bd327a4073a2c33b444646834884b 100644 (file)
@@ -59,7 +59,7 @@
 #include <asm/time.h>
 #include <asm/nvram.h>
 #include <asm/plpar_wrappers.h>
-#include <asm/xics.h>
+#include "xics.h"
 #include <asm/firmware.h>
 #include <asm/pmc.h>
 #include <asm/mpic.h>
index ae1bd270f308496e29c0951271569cc609828c1a..9c9458ddfc250bc89797e81ab9d9f0581c3d79d0 100644 (file)
@@ -39,7 +39,7 @@
 #include <asm/paca.h>
 #include <asm/time.h>
 #include <asm/machdep.h>
-#include <asm/xics.h>
+#include "xics.h"
 #include <asm/cputable.h>
 #include <asm/firmware.h>
 #include <asm/system.h>
similarity index 98%
rename from arch/ppc64/kernel/xics.c
rename to arch/powerpc/platforms/pseries/xics.c
index a32207dcf2e3fdc09fb42da285faec138cd8df0e..c72c86f05cb6533f4c1645001e9d5d42d3f029ff 100644 (file)
@@ -1,5 +1,5 @@
-/* 
- * arch/ppc64/kernel/xics.c
+/*
+ * arch/powerpc/platforms/pseries/xics.c
  *
  * Copyright 2000 IBM Corporation.
  *
 #include <asm/pgtable.h>
 #include <asm/smp.h>
 #include <asm/rtas.h>
-#include <asm/xics.h>
 #include <asm/hvcall.h>
 #include <asm/machdep.h>
 #include <asm/i8259.h>
 
+#include "xics.h"
+
 static unsigned int xics_startup(unsigned int irq);
 static void xics_enable_irq(unsigned int irq);
 static void xics_disable_irq(unsigned int irq);
@@ -61,7 +62,7 @@ static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC);
 /* Want a priority other than 0.  Various HW issues require this. */
 #define        DEFAULT_PRIORITY        5
 
-/* 
+/*
  * Mark IPIs as higher priority so we can take them inside interrupts that
  * arent marked SA_INTERRUPT
  */
@@ -168,11 +169,11 @@ static inline long plpar_xirr(unsigned long *xirr_ret)
 static int pSeriesLP_xirr_info_get(int n_cpu)
 {
        unsigned long lpar_rc;
-       unsigned long return_value; 
+       unsigned long return_value;
 
        lpar_rc = plpar_xirr(&return_value);
        if (lpar_rc != H_Success)
-               panic(" bad return code xirr - rc = %lx \n", lpar_rc); 
+               panic(" bad return code xirr - rc = %lx \n", lpar_rc);
        return (int)return_value;
 }
 
@@ -184,7 +185,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value)
        lpar_rc = plpar_eoi(val64);
        if (lpar_rc != H_Success)
                panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc,
-                     val64); 
+                     val64);
 }
 
 void pSeriesLP_cppr_info(int n_cpu, u8 value)
@@ -193,7 +194,7 @@ void pSeriesLP_cppr_info(int n_cpu, u8 value)
 
        lpar_rc = plpar_cppr(value);
        if (lpar_rc != H_Success)
-               panic("bad return code cppr - rc = %lx\n", lpar_rc); 
+               panic("bad return code cppr - rc = %lx\n", lpar_rc);
 }
 
 static void pSeriesLP_qirr_info(int n_cpu , u8 value)
@@ -202,7 +203,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value)
 
        lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
        if (lpar_rc != H_Success)
-               panic("bad return code qirr - rc = %lx\n", lpar_rc); 
+               panic("bad return code qirr - rc = %lx\n", lpar_rc);
 }
 
 xics_ops pSeriesLP_ops = {
@@ -461,7 +462,7 @@ void xics_init_IRQ(void)
        struct xics_interrupt_node {
                unsigned long addr;
                unsigned long size;
-       } intnodes[NR_CPUS]; 
+       } intnodes[NR_CPUS];
 
        ppc64_boot_msg(0x20, "XICS Init");
 
@@ -486,7 +487,7 @@ nextnode:
        ireg = (uint *)get_property(np, "reg", &ilen);
        if (!ireg)
                panic("xics_init_IRQ: can't find interrupt reg property");
-       
+
        while (ilen) {
                intnodes[indx].addr = (unsigned long)*ireg++ << 32;
                ilen -= sizeof(uint);
@@ -554,7 +555,7 @@ nextnode:
                                continue;
 
                        hard_id = get_hard_smp_processor_id(i);
-                       xics_per_cpu[i] = ioremap(intnodes[hard_id].addr, 
+                       xics_per_cpu[i] = ioremap(intnodes[hard_id].addr,
                                                  intnodes[hard_id].size);
                }
 #else
similarity index 84%
rename from include/asm-ppc64/xics.h
rename to arch/powerpc/platforms/pseries/xics.h
index 1092af55d7071a46f49fe11bbd501d2015496221..e14c70868f1d6d90928b71797747f76365648da9 100644 (file)
@@ -1,5 +1,5 @@
-/* 
- * arch/ppc64/kernel/xics.h
+/*
+ * arch/powerpc/platforms/pseries/xics.h
  *
  * Copyright 2000 IBM Corporation.
  *
@@ -9,8 +9,8 @@
  *  2 of the License, or (at your option) any later version.
  */
 
-#ifndef _PPC64_KERNEL_XICS_H
-#define _PPC64_KERNEL_XICS_H
+#ifndef _POWERPC_KERNEL_XICS_H
+#define _POWERPC_KERNEL_XICS_H
 
 #include <linux/cache.h>
 
@@ -31,4 +31,4 @@ struct xics_ipi_struct {
 
 extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
 
-#endif /* _PPC64_KERNEL_XICS_H */
+#endif /* _POWERPC_KERNEL_XICS_H */
index a20a305b825daca24a87f1a7405b31351463ef17..3cf7f3dab511454381d1edb59634d8a71be0a000 100644 (file)
@@ -53,8 +53,6 @@ obj-$(CONFIG_BOOTX_TEXT)      += btext.o
 endif
 obj-$(CONFIG_HVCS)             += hvcserver.o
 
-obj-$(CONFIG_XICS)             += xics.o
-
 obj-$(CONFIG_PPC_PMAC)         += udbg_scc.o
 
 obj-$(CONFIG_PPC_MAPLE)                += maple_setup.o maple_pci.o maple_time.o \