From 69a80d3f69d0b2d7fae5a73c6e034d402d434d8a Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 10 Oct 2005 22:03:41 +1000 Subject: [PATCH] powerpc: move pSeries files to arch/powerpc/platforms/pseries Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/pseries/Makefile | 4 ++ .../platforms/pseries/hvCall.S} | 0 .../platforms/pseries/iommu.c} | 0 .../platforms/pseries/lpar.c} | 0 .../platforms/pseries/nvram.c} | 0 .../platforms/pseries/pci.c} | 0 .../platforms/pseries/reconfig.c} | 0 .../platforms/pseries/setup.c} | 6 +-- .../platforms/pseries/smp.c} | 48 +------------------ .../platforms/pseries/vio.c} | 0 arch/ppc64/kernel/Makefile | 4 +- 12 files changed, 10 insertions(+), 53 deletions(-) create mode 100644 arch/powerpc/platforms/pseries/Makefile rename arch/{ppc64/kernel/pSeries_hvCall.S => powerpc/platforms/pseries/hvCall.S} (100%) rename arch/{ppc64/kernel/pSeries_iommu.c => powerpc/platforms/pseries/iommu.c} (100%) rename arch/{ppc64/kernel/pSeries_lpar.c => powerpc/platforms/pseries/lpar.c} (100%) rename arch/{ppc64/kernel/pSeries_nvram.c => powerpc/platforms/pseries/nvram.c} (100%) rename arch/{ppc64/kernel/pSeries_pci.c => powerpc/platforms/pseries/pci.c} (100%) rename arch/{ppc64/kernel/pSeries_reconfig.c => powerpc/platforms/pseries/reconfig.c} (100%) rename arch/{ppc64/kernel/pSeries_setup.c => powerpc/platforms/pseries/setup.c} (99%) rename arch/{ppc64/kernel/pSeries_smp.c => powerpc/platforms/pseries/smp.c} (92%) rename arch/{ppc64/kernel/pSeries_vio.c => powerpc/platforms/pseries/vio.c} (100%) diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 7637ff3642c3..181ae612b2d3 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile @@ -4,4 +4,5 @@ endif obj-$(CONFIG_4xx) += 4xx/ obj-$(CONFIG_83xx) += 83xx/ obj-$(CONFIG_85xx) += 85xx/ +obj-$(CONFIG_PPC_PSERIES) += pseries/ obj-$(CONFIG_PPC_ISERIES) += iseries/ diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile new file mode 100644 index 000000000000..9ebb34180a10 --- /dev/null +++ b/arch/powerpc/platforms/pseries/Makefile @@ -0,0 +1,4 @@ +obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ + setup.o iommu.o +obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_IBMVIO) += vio.o diff --git a/arch/ppc64/kernel/pSeries_hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S similarity index 100% rename from arch/ppc64/kernel/pSeries_hvCall.S rename to arch/powerpc/platforms/pseries/hvCall.S diff --git a/arch/ppc64/kernel/pSeries_iommu.c b/arch/powerpc/platforms/pseries/iommu.c similarity index 100% rename from arch/ppc64/kernel/pSeries_iommu.c rename to arch/powerpc/platforms/pseries/iommu.c diff --git a/arch/ppc64/kernel/pSeries_lpar.c b/arch/powerpc/platforms/pseries/lpar.c similarity index 100% rename from arch/ppc64/kernel/pSeries_lpar.c rename to arch/powerpc/platforms/pseries/lpar.c diff --git a/arch/ppc64/kernel/pSeries_nvram.c b/arch/powerpc/platforms/pseries/nvram.c similarity index 100% rename from arch/ppc64/kernel/pSeries_nvram.c rename to arch/powerpc/platforms/pseries/nvram.c diff --git a/arch/ppc64/kernel/pSeries_pci.c b/arch/powerpc/platforms/pseries/pci.c similarity index 100% rename from arch/ppc64/kernel/pSeries_pci.c rename to arch/powerpc/platforms/pseries/pci.c diff --git a/arch/ppc64/kernel/pSeries_reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c similarity index 100% rename from arch/ppc64/kernel/pSeries_reconfig.c rename to arch/powerpc/platforms/pseries/reconfig.c diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/powerpc/platforms/pseries/setup.c similarity index 99% rename from arch/ppc64/kernel/pSeries_setup.c rename to arch/powerpc/platforms/pseries/setup.c index 5a9fe96f9f67..eb25ee2eead8 100644 --- a/arch/ppc64/kernel/pSeries_setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -64,8 +64,8 @@ #include #include #include - -#include "i8259.h" +#include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -124,7 +124,7 @@ static int pSeries_irq_cascade(struct pt_regs *regs, void *data) if (chrp_int_ack_special) return readb(chrp_int_ack_special); else - return i8259_irq(smp_processor_id()); + return i8259_irq(regs); } static void __init pSeries_init_mpic(void) diff --git a/arch/ppc64/kernel/pSeries_smp.c b/arch/powerpc/platforms/pseries/smp.c similarity index 92% rename from arch/ppc64/kernel/pSeries_smp.c rename to arch/powerpc/platforms/pseries/smp.c index 5d1ed850f47b..ae1bd270f308 100644 --- a/arch/ppc64/kernel/pSeries_smp.c +++ b/arch/powerpc/platforms/pseries/smp.c @@ -1,5 +1,5 @@ /* - * SMP support for pSeries and BPA machines. + * SMP support for pSeries machines. * * Dave Engebretsen, Peter Bergner, and * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com @@ -48,8 +48,6 @@ #include #include -#include "bpa_iic.h" - #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else @@ -343,36 +341,6 @@ static void __devinit smp_xics_setup_cpu(int cpu) } #endif /* CONFIG_XICS */ -#ifdef CONFIG_BPA_IIC -static void smp_iic_message_pass(int target, int msg) -{ - unsigned int i; - - if (target < NR_CPUS) { - iic_cause_IPI(target, msg); - } else { - for_each_online_cpu(i) { - if (target == MSG_ALL_BUT_SELF - && i == smp_processor_id()) - continue; - iic_cause_IPI(i, msg); - } - } -} - -static int __init smp_iic_probe(void) -{ - iic_request_IPIs(); - - return cpus_weight(cpu_possible_map); -} - -static void __devinit smp_iic_setup_cpu(int cpu) -{ - if (cpu != boot_cpuid) - iic_setup_cpu(); -} -#endif /* CONFIG_BPA_IIC */ static DEFINE_SPINLOCK(timebase_lock); static unsigned long timebase = 0; @@ -444,15 +412,6 @@ static struct smp_ops_t pSeries_xics_smp_ops = { .cpu_bootable = smp_pSeries_cpu_bootable, }; #endif -#ifdef CONFIG_BPA_IIC -static struct smp_ops_t bpa_iic_smp_ops = { - .message_pass = smp_iic_message_pass, - .probe = smp_iic_probe, - .kick_cpu = smp_pSeries_kick_cpu, - .setup_cpu = smp_iic_setup_cpu, - .cpu_bootable = smp_pSeries_cpu_bootable, -}; -#endif /* This is called very early */ void __init smp_init_pSeries(void) @@ -471,11 +430,6 @@ void __init smp_init_pSeries(void) case IC_PPC_XIC: smp_ops = &pSeries_xics_smp_ops; break; -#endif -#ifdef CONFIG_BPA_IIC - case IC_BPA_IIC: - smp_ops = &bpa_iic_smp_ops; - break; #endif default: panic("Invalid interrupt controller"); diff --git a/arch/ppc64/kernel/pSeries_vio.c b/arch/powerpc/platforms/pseries/vio.c similarity index 100% rename from arch/ppc64/kernel/pSeries_vio.c rename to arch/powerpc/platforms/pseries/vio.c diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile index 32fd3f1c7935..6a0fea272386 100644 --- a/arch/ppc64/kernel/Makefile +++ b/arch/ppc64/kernel/Makefile @@ -24,9 +24,7 @@ obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o -obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ - pSeries_nvram.o rtasd.o ras.o pSeries_reconfig.o \ - pSeries_setup.o pSeries_iommu.o udbg_16550.o +obj-$(CONFIG_PPC_PSERIES) += rtasd.o ras.o udbg_16550.o obj-$(CONFIG_PPC_BPA) += bpa_setup.o bpa_iommu.o bpa_nvram.o \ bpa_iic.o spider-pic.o -- 2.20.1