From a7fec5ff9808c262d6778dfb80d83d7e97579ffd Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 28 Sep 2005 23:37:01 +1000 Subject: [PATCH] --- yaml --- r: 11504 b: refs/heads/master c: b08567cb680686cdea9e362c0ccf0a08d77b9f0c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/ppc_ksyms.c | 2 ++ trunk/arch/powerpc/kernel/process.c | 17 +++++------------ .../powerpc/platforms/iseries/call_sm.h} | 7 +++---- .../powerpc/platforms/iseries/ipl_parms.h} | 7 +++---- trunk/arch/powerpc/platforms/iseries/irq.c | 3 ++- .../powerpc/platforms/iseries/irq.h} | 6 +++--- trunk/arch/powerpc/platforms/iseries/lpardata.c | 10 +++++----- .../powerpc/platforms/iseries/main_store.h} | 7 +++---- trunk/arch/powerpc/platforms/iseries/pci.c | 3 ++- trunk/arch/powerpc/platforms/iseries/proc.c | 5 +++-- .../powerpc/platforms/iseries/processor_vpd.h} | 7 +++---- .../powerpc/platforms/iseries/release_data.h} | 7 +++---- trunk/arch/powerpc/platforms/iseries/setup.c | 10 +++++----- .../powerpc/platforms/iseries/spcomm_area.h} | 7 +++---- .../powerpc/platforms/iseries/vpd_areas.h} | 7 +++---- .../arch/powerpc/platforms/powermac/pmac_pic.c | 7 +++---- .../arch/powerpc/platforms/powermac/pmac_smp.c | 10 +++++----- trunk/arch/powerpc/sysdev/mpic.c | 3 --- 19 files changed, 57 insertions(+), 70 deletions(-) rename trunk/{include/asm-ppc64/iSeries/HvCallSm.h => arch/powerpc/platforms/iseries/call_sm.h} (93%) rename trunk/{include/asm-ppc64/iSeries/ItIplParmsReal.h => arch/powerpc/platforms/iseries/ipl_parms.h} (96%) rename trunk/{include/asm-ppc64/iSeries/iSeries_irq.h => arch/powerpc/platforms/iseries/irq.h} (64%) rename trunk/{include/asm-ppc64/iSeries/IoHriMainStore.h => arch/powerpc/platforms/iseries/main_store.h} (97%) rename trunk/{include/asm-ppc64/iSeries/IoHriProcessorVpd.h => arch/powerpc/platforms/iseries/processor_vpd.h} (96%) rename trunk/{include/asm-ppc64/iSeries/HvReleaseData.h => arch/powerpc/platforms/iseries/release_data.h} (95%) rename trunk/{include/asm-ppc64/iSeries/ItSpCommArea.h => arch/powerpc/platforms/iseries/spcomm_area.h} (93%) rename trunk/{include/asm-ppc64/iSeries/ItVpdAreas.h => arch/powerpc/platforms/iseries/vpd_areas.h} (97%) diff --git a/[refs] b/[refs] index 88bb184272d1..ce2757bbde2b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c0c0d996d08e450164adedc249c1bbbca63524ce +refs/heads/master: b08567cb680686cdea9e362c0ccf0a08d77b9f0c diff --git a/trunk/arch/powerpc/kernel/ppc_ksyms.c b/trunk/arch/powerpc/kernel/ppc_ksyms.c index e73b0699b5f0..7bfa0f0121ff 100644 --- a/trunk/arch/powerpc/kernel/ppc_ksyms.c +++ b/trunk/arch/powerpc/kernel/ppc_ksyms.c @@ -182,9 +182,11 @@ EXPORT_SYMBOL(flush_tlb_kernel_range); EXPORT_SYMBOL(flush_tlb_page); EXPORT_SYMBOL(_tlbie); #ifdef CONFIG_ALTIVEC +EXPORT_SYMBOL(last_task_used_altivec); EXPORT_SYMBOL(giveup_altivec); #endif /* CONFIG_ALTIVEC */ #ifdef CONFIG_SPE +EXPORT_SYMBOL(last_task_used_spe); EXPORT_SYMBOL(giveup_spe); #endif /* CONFIG_SPE */ #ifdef CONFIG_SMP diff --git a/trunk/arch/powerpc/kernel/process.c b/trunk/arch/powerpc/kernel/process.c index ae316e9ed581..e3946769dd8e 100644 --- a/trunk/arch/powerpc/kernel/process.c +++ b/trunk/arch/powerpc/kernel/process.c @@ -272,6 +272,11 @@ struct task_struct *__switch_to(struct task_struct *prev, */ if (prev->thread.regs && (prev->thread.regs->msr & MSR_VEC)) giveup_altivec(prev); + /* Avoid the trap. On smp this this never happens since + * we don't set last_task_used_altivec -- Cort + */ + if (new->thread.regs && last_task_used_altivec == new) + new->thread.regs->msr |= MSR_VEC; #endif /* CONFIG_ALTIVEC */ #ifdef CONFIG_SPE /* @@ -283,24 +288,12 @@ struct task_struct *__switch_to(struct task_struct *prev, */ if ((prev->thread.regs && (prev->thread.regs->msr & MSR_SPE))) giveup_spe(prev); -#endif /* CONFIG_SPE */ - -#else /* CONFIG_SMP */ -#ifdef CONFIG_ALTIVEC - /* Avoid the trap. On smp this this never happens since - * we don't set last_task_used_altivec -- Cort - */ - if (new->thread.regs && last_task_used_altivec == new) - new->thread.regs->msr |= MSR_VEC; -#endif /* CONFIG_ALTIVEC */ -#ifdef CONFIG_SPE /* Avoid the trap. On smp this this never happens since * we don't set last_task_used_spe */ if (new->thread.regs && last_task_used_spe == new) new->thread.regs->msr |= MSR_SPE; #endif /* CONFIG_SPE */ - #endif /* CONFIG_SMP */ #ifdef CONFIG_PPC64 /* for now */ diff --git a/trunk/include/asm-ppc64/iSeries/HvCallSm.h b/trunk/arch/powerpc/platforms/iseries/call_sm.h similarity index 93% rename from trunk/include/asm-ppc64/iSeries/HvCallSm.h rename to trunk/arch/powerpc/platforms/iseries/call_sm.h index 8a3dbb071a43..ef223166cf22 100644 --- a/trunk/include/asm-ppc64/iSeries/HvCallSm.h +++ b/trunk/arch/powerpc/platforms/iseries/call_sm.h @@ -1,5 +1,4 @@ /* - * HvCallSm.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -16,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _HVCALLSM_H -#define _HVCALLSM_H +#ifndef _ISERIES_CALL_SM_H +#define _ISERIES_CALL_SM_H /* * This file contains the "hypervisor call" interface which is used to @@ -35,4 +34,4 @@ static inline u64 HvCallSm_get64BitsOfAccessMap(HvLpIndex lpIndex, return HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex, indexIntoBitMap); } -#endif /* _HVCALLSM_H */ +#endif /* _ISERIES_CALL_SM_H */ diff --git a/trunk/include/asm-ppc64/iSeries/ItIplParmsReal.h b/trunk/arch/powerpc/platforms/iseries/ipl_parms.h similarity index 96% rename from trunk/include/asm-ppc64/iSeries/ItIplParmsReal.h rename to trunk/arch/powerpc/platforms/iseries/ipl_parms.h index ae3417dc599e..77c135ddbf1b 100644 --- a/trunk/include/asm-ppc64/iSeries/ItIplParmsReal.h +++ b/trunk/arch/powerpc/platforms/iseries/ipl_parms.h @@ -1,5 +1,4 @@ /* - * ItIplParmsReal.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -16,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _ITIPLPARMSREAL_H -#define _ITIPLPARMSREAL_H +#ifndef _ISERIES_IPL_PARMS_H +#define _ISERIES_IPL_PARMS_H /* * This struct maps the IPL Parameters DMA'd from the SP. @@ -68,4 +67,4 @@ struct ItIplParmsReal { extern struct ItIplParmsReal xItIplParmsReal; -#endif /* _ITIPLPARMSREAL_H */ +#endif /* _ISERIES_IPL_PARMS_H */ diff --git a/trunk/arch/powerpc/platforms/iseries/irq.c b/trunk/arch/powerpc/platforms/iseries/irq.c index 5a8a0056b31f..31fb5fa67fa3 100644 --- a/trunk/arch/powerpc/platforms/iseries/irq.c +++ b/trunk/arch/powerpc/platforms/iseries/irq.c @@ -40,7 +40,8 @@ #include #include #include -#include + +#include "irq.h" /* This maps virtual irq numbers to real irqs */ unsigned int virt_irq_to_real_map[NR_IRQS]; diff --git a/trunk/include/asm-ppc64/iSeries/iSeries_irq.h b/trunk/arch/powerpc/platforms/iseries/irq.h similarity index 64% rename from trunk/include/asm-ppc64/iSeries/iSeries_irq.h rename to trunk/arch/powerpc/platforms/iseries/irq.h index 6c9767ac1302..5f643f16ecc0 100644 --- a/trunk/include/asm-ppc64/iSeries/iSeries_irq.h +++ b/trunk/arch/powerpc/platforms/iseries/irq.h @@ -1,8 +1,8 @@ -#ifndef __ISERIES_IRQ_H__ -#define __ISERIES_IRQ_H__ +#ifndef _ISERIES_IRQ_H +#define _ISERIES_IRQ_H extern void iSeries_init_IRQ(void); extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId); extern void iSeries_activate_IRQs(void); -#endif /* __ISERIES_IRQ_H__ */ +#endif /* _ISERIES_IRQ_H */ diff --git a/trunk/arch/powerpc/platforms/iseries/lpardata.c b/trunk/arch/powerpc/platforms/iseries/lpardata.c index 87b7ad8ca465..ed2ffee6f731 100644 --- a/trunk/arch/powerpc/platforms/iseries/lpardata.c +++ b/trunk/arch/powerpc/platforms/iseries/lpardata.c @@ -19,15 +19,15 @@ #include #include #include -#include #include -#include -#include #include #include -#include -#include +#include "vpd_areas.h" +#include "spcomm_area.h" +#include "ipl_parms.h" +#include "processor_vpd.h" +#include "release_data.h" /* The HvReleaseData is the root of the information shared between * the hypervisor and Linux. diff --git a/trunk/include/asm-ppc64/iSeries/IoHriMainStore.h b/trunk/arch/powerpc/platforms/iseries/main_store.h similarity index 97% rename from trunk/include/asm-ppc64/iSeries/IoHriMainStore.h rename to trunk/arch/powerpc/platforms/iseries/main_store.h index 45ed3ea67d06..74f6889f834f 100644 --- a/trunk/include/asm-ppc64/iSeries/IoHriMainStore.h +++ b/trunk/arch/powerpc/platforms/iseries/main_store.h @@ -1,5 +1,4 @@ /* - * IoHriMainStore.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -17,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _IOHRIMAINSTORE_H -#define _IOHRIMAINSTORE_H +#ifndef _ISERIES_MAIN_STORE_H +#define _ISERIES_MAIN_STORE_H /* Main Store Vpd for Condor,iStar,sStar */ struct IoHriMainStoreSegment4 { @@ -163,4 +162,4 @@ struct IoHriMainStoreSegment5 { extern u64 xMsVpd[]; -#endif /* _IOHRIMAINSTORE_H */ +#endif /* _ISERIES_MAIN_STORE_H */ diff --git a/trunk/arch/powerpc/platforms/iseries/pci.c b/trunk/arch/powerpc/platforms/iseries/pci.c index 501b1dcbfac5..70185dec940b 100644 --- a/trunk/arch/powerpc/platforms/iseries/pci.c +++ b/trunk/arch/powerpc/platforms/iseries/pci.c @@ -37,12 +37,13 @@ #include #include -#include #include #include #include +#include "irq.h" + extern unsigned long io_page_mask; /* diff --git a/trunk/arch/powerpc/platforms/iseries/proc.c b/trunk/arch/powerpc/platforms/iseries/proc.c index d46b473ce4dd..6f1929cac66b 100644 --- a/trunk/arch/powerpc/platforms/iseries/proc.c +++ b/trunk/arch/powerpc/platforms/iseries/proc.c @@ -26,8 +26,9 @@ #include #include #include -#include -#include + +#include "processor_vpd.h" +#include "main_store.h" static int __init iseries_proc_create(void) { diff --git a/trunk/include/asm-ppc64/iSeries/IoHriProcessorVpd.h b/trunk/arch/powerpc/platforms/iseries/processor_vpd.h similarity index 96% rename from trunk/include/asm-ppc64/iSeries/IoHriProcessorVpd.h rename to trunk/arch/powerpc/platforms/iseries/processor_vpd.h index 73b73d80b8b1..7ac5d0d0dbfa 100644 --- a/trunk/include/asm-ppc64/iSeries/IoHriProcessorVpd.h +++ b/trunk/arch/powerpc/platforms/iseries/processor_vpd.h @@ -1,5 +1,4 @@ /* - * IoHriProcessorVpd.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -16,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _IOHRIPROCESSORVPD_H -#define _IOHRIPROCESSORVPD_H +#ifndef _ISERIES_PROCESSOR_VPD_H +#define _ISERIES_PROCESSOR_VPD_H #include @@ -83,4 +82,4 @@ struct IoHriProcessorVpd { extern struct IoHriProcessorVpd xIoHriProcessorVpd[]; -#endif /* _IOHRIPROCESSORVPD_H */ +#endif /* _ISERIES_PROCESSOR_VPD_H */ diff --git a/trunk/include/asm-ppc64/iSeries/HvReleaseData.h b/trunk/arch/powerpc/platforms/iseries/release_data.h similarity index 95% rename from trunk/include/asm-ppc64/iSeries/HvReleaseData.h rename to trunk/arch/powerpc/platforms/iseries/release_data.h index c8162e5ccb21..c68b9c3e5caf 100644 --- a/trunk/include/asm-ppc64/iSeries/HvReleaseData.h +++ b/trunk/arch/powerpc/platforms/iseries/release_data.h @@ -1,5 +1,4 @@ /* - * HvReleaseData.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -16,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _HVRELEASEDATA_H -#define _HVRELEASEDATA_H +#ifndef _ISERIES_RELEASE_DATA_H +#define _ISERIES_RELEASE_DATA_H /* * This control block contains the critical information about the @@ -61,4 +60,4 @@ struct HvReleaseData { extern struct HvReleaseData hvReleaseData; -#endif /* _HVRELEASEDATA_H */ +#endif /* _ISERIES_RELEASE_DATA_H */ diff --git a/trunk/arch/powerpc/platforms/iseries/setup.c b/trunk/arch/powerpc/platforms/iseries/setup.c index ad78c8581a5a..c3e532b766ef 100644 --- a/trunk/arch/powerpc/platforms/iseries/setup.c +++ b/trunk/arch/powerpc/platforms/iseries/setup.c @@ -48,18 +48,18 @@ #include #include #include -#include #include #include -#include #include #include -#include -#include -#include #include #include "setup.h" +#include "irq.h" +#include "vpd_areas.h" +#include "processor_vpd.h" +#include "main_store.h" +#include "call_sm.h" extern void hvlog(char *fmt, ...); diff --git a/trunk/include/asm-ppc64/iSeries/ItSpCommArea.h b/trunk/arch/powerpc/platforms/iseries/spcomm_area.h similarity index 93% rename from trunk/include/asm-ppc64/iSeries/ItSpCommArea.h rename to trunk/arch/powerpc/platforms/iseries/spcomm_area.h index 5535f8271c9f..6e3b685115c9 100644 --- a/trunk/include/asm-ppc64/iSeries/ItSpCommArea.h +++ b/trunk/arch/powerpc/platforms/iseries/spcomm_area.h @@ -1,5 +1,4 @@ /* - * ItSpCommArea.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -17,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _ITSPCOMMAREA_H -#define _ITSPCOMMAREA_H +#ifndef _ISERIES_SPCOMM_AREA_H +#define _ISERIES_SPCOMM_AREA_H struct SpCommArea { @@ -34,4 +33,4 @@ struct SpCommArea { extern struct SpCommArea xSpCommArea; -#endif /* _ITSPCOMMAREA_H */ +#endif /* _ISERIES_SPCOMM_AREA_H */ diff --git a/trunk/include/asm-ppc64/iSeries/ItVpdAreas.h b/trunk/arch/powerpc/platforms/iseries/vpd_areas.h similarity index 97% rename from trunk/include/asm-ppc64/iSeries/ItVpdAreas.h rename to trunk/arch/powerpc/platforms/iseries/vpd_areas.h index 71b3ad24f95a..601e6dd860ed 100644 --- a/trunk/include/asm-ppc64/iSeries/ItVpdAreas.h +++ b/trunk/arch/powerpc/platforms/iseries/vpd_areas.h @@ -1,5 +1,4 @@ /* - * ItVpdAreas.h * Copyright (C) 2001 Mike Corrigan IBM Corporation * * This program is free software; you can redistribute it and/or modify @@ -16,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _ITVPDAREAS_H -#define _ITVPDAREAS_H +#ifndef _ISERIES_VPD_AREAS_H +#define _ISERIES_VPD_AREAS_H /* * This file defines the address and length of all of the VPD area passed to @@ -86,4 +85,4 @@ struct ItVpdAreas { extern struct ItVpdAreas itVpdAreas; -#endif /* _ITVPDAREAS_H */ +#endif /* _ISERIES_VPD_AREAS_H */ diff --git a/trunk/arch/powerpc/platforms/powermac/pmac_pic.c b/trunk/arch/powerpc/platforms/powermac/pmac_pic.c index 7ddd5264cc6e..a6b1b577e19f 100644 --- a/trunk/arch/powerpc/platforms/powermac/pmac_pic.c +++ b/trunk/arch/powerpc/platforms/powermac/pmac_pic.c @@ -430,7 +430,7 @@ void __init pmac_pic_init(void) prom_get_irq_senses(senses, 0, 128); mpic1 = mpic_alloc(irqctrler->addrs[0].address, MPIC_PRIMARY | MPIC_WANTS_RESET, - 0, 0, 128, 252, senses, 128, " OpenPIC "); + 0, 0, 128, 256, senses, 128, " K2-MPIC "); BUG_ON(mpic1 == NULL); mpic_init(mpic1); @@ -441,15 +441,14 @@ void __init pmac_pic_init(void) irqctrler2->intrs[0].line); pmac_call_feature(PMAC_FTR_ENABLE_MPIC, irqctrler2, 0, 0); - prom_get_irq_senses(senses, 128, 128 + 124); + prom_get_irq_senses(senses, 128, 128 + 128); /* We don't need to set MPIC_BROKEN_U3 here since we don't have * hypertransport interrupts routed to it */ mpic2 = mpic_alloc(irqctrler2->addrs[0].address, MPIC_BIG_ENDIAN | MPIC_WANTS_RESET, - 0, 128, 124, 0, senses, 124, - " U3-MPIC "); + 0, 128, 128, 0, senses, 128, " U3-MPIC "); BUG_ON(mpic2 == NULL); mpic_init(mpic2); mpic_setup_cascade(irqctrler2->intrs[0].line, diff --git a/trunk/arch/powerpc/platforms/powermac/pmac_smp.c b/trunk/arch/powerpc/platforms/powermac/pmac_smp.c index fb996336c58b..995e9095d865 100644 --- a/trunk/arch/powerpc/platforms/powermac/pmac_smp.c +++ b/trunk/arch/powerpc/platforms/powermac/pmac_smp.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include @@ -638,14 +638,14 @@ void smp_core99_message_pass(int target, int msg, unsigned long data, int wait) } switch (target) { case MSG_ALL: - mpic_send_ipi(msg, cpus_addr(mask)[0]); + mpic_send_ipi(msg, mask); break; case MSG_ALL_BUT_SELF: cpu_clear(smp_processor_id(), mask); - mpic_send_ipi(msg, cpus_addr(mask)[0]); + mpic_send_ipi(msg, mask); break; default: - mpic_send_ipi(msg, 1 << target); + mpic_send_ipi(msg, cpumask_of_cpu(target)); break; } } @@ -678,7 +678,7 @@ int __cpu_disable(void) cpu_clear(smp_processor_id(), cpu_online_map); /* XXX reset cpu affinity here */ - mpic_cpu_set_priority(0xf); + openpic_set_priority(0xf); asm volatile("mtdec %0" : : "r" (0x7fffffff)); mb(); udelay(20); diff --git a/trunk/arch/powerpc/sysdev/mpic.c b/trunk/arch/powerpc/sysdev/mpic.c index 02b4d2488bfd..c660e7d7c643 100644 --- a/trunk/arch/powerpc/sysdev/mpic.c +++ b/trunk/arch/powerpc/sysdev/mpic.c @@ -44,9 +44,6 @@ static struct mpic *mpics; static struct mpic *mpic_primary; static DEFINE_SPINLOCK(mpic_lock); -#ifdef CONFIG_PPC32 /* XXX for now */ -#define distribute_irqs CONFIG_IRQ_ALL_CPUS -#endif /* * Register accessor functions