aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2005-10-28 01:35:50 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-28 02:39:19 -0400
commit007e8f51b26ae7b6a17651af5a0f01ab6491cdca (patch)
tree916b72b8bdb4ffde07cf9ee05571b529cd9724b6
parent22b280324acbfd1a1f2374055d9bb39e7069e2bf (diff)
[PATCH] powerpc: Move xics.[ch] into platforms/pseries
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>
-rw-r--r--arch/powerpc/platforms/pseries/Makefile1
-rw-r--r--arch/powerpc/platforms/pseries/setup.c2
-rw-r--r--arch/powerpc/platforms/pseries/smp.c2
-rw-r--r--arch/powerpc/platforms/pseries/xics.c (renamed from arch/ppc64/kernel/xics.c)25
-rw-r--r--arch/powerpc/platforms/pseries/xics.h (renamed from include/asm-ppc64/xics.h)10
-rw-r--r--arch/ppc64/kernel/Makefile2
6 files changed, 21 insertions, 21 deletions
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index d5c160b789e3..5ef494e3a70f 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -2,3 +2,4 @@ obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \
2 setup.o iommu.o rtas-fw.o ras.o 2 setup.o iommu.o rtas-fw.o ras.o
3obj-$(CONFIG_SMP) += smp.o 3obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_IBMVIO) += vio.o 4obj-$(CONFIG_IBMVIO) += vio.o
5obj-$(CONFIG_XICS) += xics.o
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 7e7e556e6b48..10cb0f2d9b5b 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -59,7 +59,7 @@
59#include <asm/time.h> 59#include <asm/time.h>
60#include <asm/nvram.h> 60#include <asm/nvram.h>
61#include <asm/plpar_wrappers.h> 61#include <asm/plpar_wrappers.h>
62#include <asm/xics.h> 62#include "xics.h"
63#include <asm/firmware.h> 63#include <asm/firmware.h>
64#include <asm/pmc.h> 64#include <asm/pmc.h>
65#include <asm/mpic.h> 65#include <asm/mpic.h>
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index ae1bd270f308..9c9458ddfc25 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -39,7 +39,7 @@
39#include <asm/paca.h> 39#include <asm/paca.h>
40#include <asm/time.h> 40#include <asm/time.h>
41#include <asm/machdep.h> 41#include <asm/machdep.h>
42#include <asm/xics.h> 42#include "xics.h"
43#include <asm/cputable.h> 43#include <asm/cputable.h>
44#include <asm/firmware.h> 44#include <asm/firmware.h>
45#include <asm/system.h> 45#include <asm/system.h>
diff --git a/arch/ppc64/kernel/xics.c b/arch/powerpc/platforms/pseries/xics.c
index a32207dcf2e3..c72c86f05cb6 100644
--- a/arch/ppc64/kernel/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/ppc64/kernel/xics.c 2 * arch/powerpc/platforms/pseries/xics.c
3 * 3 *
4 * Copyright 2000 IBM Corporation. 4 * Copyright 2000 IBM Corporation.
5 * 5 *
@@ -25,11 +25,12 @@
25#include <asm/pgtable.h> 25#include <asm/pgtable.h>
26#include <asm/smp.h> 26#include <asm/smp.h>
27#include <asm/rtas.h> 27#include <asm/rtas.h>
28#include <asm/xics.h>
29#include <asm/hvcall.h> 28#include <asm/hvcall.h>
30#include <asm/machdep.h> 29#include <asm/machdep.h>
31#include <asm/i8259.h> 30#include <asm/i8259.h>
32 31
32#include "xics.h"
33
33static unsigned int xics_startup(unsigned int irq); 34static unsigned int xics_startup(unsigned int irq);
34static void xics_enable_irq(unsigned int irq); 35static void xics_enable_irq(unsigned int irq);
35static void xics_disable_irq(unsigned int irq); 36static void xics_disable_irq(unsigned int irq);
@@ -61,7 +62,7 @@ static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC);
61/* Want a priority other than 0. Various HW issues require this. */ 62/* Want a priority other than 0. Various HW issues require this. */
62#define DEFAULT_PRIORITY 5 63#define DEFAULT_PRIORITY 5
63 64
64/* 65/*
65 * Mark IPIs as higher priority so we can take them inside interrupts that 66 * Mark IPIs as higher priority so we can take them inside interrupts that
66 * arent marked SA_INTERRUPT 67 * arent marked SA_INTERRUPT
67 */ 68 */
@@ -168,11 +169,11 @@ static inline long plpar_xirr(unsigned long *xirr_ret)
168static int pSeriesLP_xirr_info_get(int n_cpu) 169static int pSeriesLP_xirr_info_get(int n_cpu)
169{ 170{
170 unsigned long lpar_rc; 171 unsigned long lpar_rc;
171 unsigned long return_value; 172 unsigned long return_value;
172 173
173 lpar_rc = plpar_xirr(&return_value); 174 lpar_rc = plpar_xirr(&return_value);
174 if (lpar_rc != H_Success) 175 if (lpar_rc != H_Success)
175 panic(" bad return code xirr - rc = %lx \n", lpar_rc); 176 panic(" bad return code xirr - rc = %lx \n", lpar_rc);
176 return (int)return_value; 177 return (int)return_value;
177} 178}
178 179
@@ -184,7 +185,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value)
184 lpar_rc = plpar_eoi(val64); 185 lpar_rc = plpar_eoi(val64);
185 if (lpar_rc != H_Success) 186 if (lpar_rc != H_Success)
186 panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc, 187 panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc,
187 val64); 188 val64);
188} 189}
189 190
190void pSeriesLP_cppr_info(int n_cpu, u8 value) 191void pSeriesLP_cppr_info(int n_cpu, u8 value)
@@ -193,7 +194,7 @@ void pSeriesLP_cppr_info(int n_cpu, u8 value)
193 194
194 lpar_rc = plpar_cppr(value); 195 lpar_rc = plpar_cppr(value);
195 if (lpar_rc != H_Success) 196 if (lpar_rc != H_Success)
196 panic("bad return code cppr - rc = %lx\n", lpar_rc); 197 panic("bad return code cppr - rc = %lx\n", lpar_rc);
197} 198}
198 199
199static void pSeriesLP_qirr_info(int n_cpu , u8 value) 200static void pSeriesLP_qirr_info(int n_cpu , u8 value)
@@ -202,7 +203,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value)
202 203
203 lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value); 204 lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
204 if (lpar_rc != H_Success) 205 if (lpar_rc != H_Success)
205 panic("bad return code qirr - rc = %lx\n", lpar_rc); 206 panic("bad return code qirr - rc = %lx\n", lpar_rc);
206} 207}
207 208
208xics_ops pSeriesLP_ops = { 209xics_ops pSeriesLP_ops = {
@@ -461,7 +462,7 @@ void xics_init_IRQ(void)
461 struct xics_interrupt_node { 462 struct xics_interrupt_node {
462 unsigned long addr; 463 unsigned long addr;
463 unsigned long size; 464 unsigned long size;
464 } intnodes[NR_CPUS]; 465 } intnodes[NR_CPUS];
465 466
466 ppc64_boot_msg(0x20, "XICS Init"); 467 ppc64_boot_msg(0x20, "XICS Init");
467 468
@@ -486,7 +487,7 @@ nextnode:
486 ireg = (uint *)get_property(np, "reg", &ilen); 487 ireg = (uint *)get_property(np, "reg", &ilen);
487 if (!ireg) 488 if (!ireg)
488 panic("xics_init_IRQ: can't find interrupt reg property"); 489 panic("xics_init_IRQ: can't find interrupt reg property");
489 490
490 while (ilen) { 491 while (ilen) {
491 intnodes[indx].addr = (unsigned long)*ireg++ << 32; 492 intnodes[indx].addr = (unsigned long)*ireg++ << 32;
492 ilen -= sizeof(uint); 493 ilen -= sizeof(uint);
@@ -554,7 +555,7 @@ nextnode:
554 continue; 555 continue;
555 556
556 hard_id = get_hard_smp_processor_id(i); 557 hard_id = get_hard_smp_processor_id(i);
557 xics_per_cpu[i] = ioremap(intnodes[hard_id].addr, 558 xics_per_cpu[i] = ioremap(intnodes[hard_id].addr,
558 intnodes[hard_id].size); 559 intnodes[hard_id].size);
559 } 560 }
560#else 561#else
diff --git a/include/asm-ppc64/xics.h b/arch/powerpc/platforms/pseries/xics.h
index 1092af55d707..e14c70868f1d 100644
--- a/include/asm-ppc64/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/ppc64/kernel/xics.h 2 * arch/powerpc/platforms/pseries/xics.h
3 * 3 *
4 * Copyright 2000 IBM Corporation. 4 * Copyright 2000 IBM Corporation.
5 * 5 *
@@ -9,8 +9,8 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#ifndef _PPC64_KERNEL_XICS_H 12#ifndef _POWERPC_KERNEL_XICS_H
13#define _PPC64_KERNEL_XICS_H 13#define _POWERPC_KERNEL_XICS_H
14 14
15#include <linux/cache.h> 15#include <linux/cache.h>
16 16
@@ -31,4 +31,4 @@ struct xics_ipi_struct {
31 31
32extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; 32extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
33 33
34#endif /* _PPC64_KERNEL_XICS_H */ 34#endif /* _POWERPC_KERNEL_XICS_H */
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
index a20a305b825d..3cf7f3dab511 100644
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -53,8 +53,6 @@ obj-$(CONFIG_BOOTX_TEXT) += btext.o
53endif 53endif
54obj-$(CONFIG_HVCS) += hvcserver.o 54obj-$(CONFIG_HVCS) += hvcserver.o
55 55
56obj-$(CONFIG_XICS) += xics.o
57
58obj-$(CONFIG_PPC_PMAC) += udbg_scc.o 56obj-$(CONFIG_PPC_PMAC) += udbg_scc.o
59 57
60obj-$(CONFIG_PPC_MAPLE) += maple_setup.o maple_pci.o maple_time.o \ 58obj-$(CONFIG_PPC_MAPLE) += maple_setup.o maple_pci.o maple_time.o \