diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 10:21:22 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 10:21:22 -0800 |
commit | 45bfe98bd790b5ded00462cd582effcfb42263cc (patch) | |
tree | d4a1f2c5303dda106635b615f8f40ea9104bf25e /arch/powerpc/platforms | |
parent | 9f5974c8734d83d4ab7096ed98136a82f41210d6 (diff) | |
parent | 624cee31bcb14bfd85559fbec5dd7bb833542965 (diff) | |
download | op-kernel-dev-45bfe98bd790b5ded00462cd582effcfb42263cc.zip op-kernel-dev-45bfe98bd790b5ded00462cd582effcfb42263cc.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Fix up delete/modify conflict of arch/ppc/kernel/process.c by hand (it's
gone, gone, gone).
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/platforms')
21 files changed, 82 insertions, 59 deletions
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c index 85152544..e0e051c 100644 --- a/arch/powerpc/platforms/cell/pervasive.c +++ b/arch/powerpc/platforms/cell/pervasive.c @@ -142,7 +142,7 @@ static void cbe_idle(void) } } -int cbe_system_reset_exception(struct pt_regs *regs) +static int cbe_system_reset_exception(struct pt_regs *regs) { switch (regs->msr & SRR1_WAKEMASK) { case SRR1_WAKEEE: diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 18e25e6..b33a444 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c @@ -57,7 +57,7 @@ #define DBG(fmt...) #endif -void cell_show_cpuinfo(struct seq_file *m) +static void cell_show_cpuinfo(struct seq_file *m) { struct device_node *root; const char *model = ""; diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index d549aa7..e6565a9 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c @@ -29,7 +29,9 @@ * value of the spu_status register after the SPU has stopped. * */ -long do_spu_run(struct file *filp, __u32 __user *unpc, __u32 __user *ustatus) +static long do_spu_run(struct file *filp, + __u32 __user *unpc, + __u32 __user *ustatus) { long ret; struct spufs_inode_info *i; diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index 127b465..ce8c0b9 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile @@ -1,8 +1,8 @@ EXTRA_CFLAGS += -mno-minimal-toc obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ - hvcall.o proc.o htab.o iommu.o misc.o -obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o + hvcall.o proc.o htab.o iommu.o misc.o irq.o +obj-$(CONFIG_PCI) += pci.o vpdinfo.o obj-$(CONFIG_IBMVIO) += vio.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_VIOPATH) += viopath.o diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index 2b54eeb..bea0b70 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c @@ -34,6 +34,8 @@ #include <asm/pci-bridge.h> #include <asm/iseries/hv_call_xm.h> +#include "iommu.h" + extern struct list_head iSeries_Global_Device_List; diff --git a/arch/powerpc/platforms/iseries/iommu.h b/arch/powerpc/platforms/iseries/iommu.h new file mode 100644 index 0000000..cb5658f --- /dev/null +++ b/arch/powerpc/platforms/iseries/iommu.h @@ -0,0 +1,35 @@ +#ifndef _PLATFORMS_ISERIES_IOMMU_H +#define _PLATFORMS_ISERIES_IOMMU_H + +/* + * Copyright (C) 2005 Stephen Rothwell, IBM Corporation + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the: + * Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +struct device_node; +struct iommu_table; + +/* Creates table for an individual device node */ +extern void iommu_devnode_init_iSeries(struct device_node *dn); + +/* Get table parameters from HV */ +extern void iommu_table_getparms_iSeries(unsigned long busno, + unsigned char slotno, unsigned char virtbus, + struct iommu_table *tbl); + +#endif /* _PLATFORMS_ISERIES_IOMMU_H */ diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 42e978e..83442ea 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c @@ -48,6 +48,8 @@ extern void iSeries_smp_message_recv(struct pt_regs *); #endif +#ifdef CONFIG_PCI + enum pci_event_type { pe_bus_created = 0, /* PHB has been created */ pe_bus_error = 1, /* PHB has failed */ @@ -147,20 +149,11 @@ static void int_received(struct pci_event *event, struct pt_regs *regs) static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs) { if (event && (event->xType == HvLpEvent_Type_PciIo)) { - switch (event->xFlags.xFunction) { - case HvLpEvent_Function_Int: + if (hvlpevent_is_int(event)) int_received((struct pci_event *)event, regs); - break; - case HvLpEvent_Function_Ack: + else printk(KERN_ERR "pci_event_handler: unexpected ack received\n"); - break; - default: - printk(KERN_ERR - "pci_event_handler: unexpected event function %d\n", - (int)event->xFlags.xFunction); - break; - } } else if (event) printk(KERN_ERR "pci_event_handler: Unrecognized PCI event type 0x%x\n", @@ -334,6 +327,8 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus, return virtirq; } +#endif /* CONFIG_PCI */ + /* * Get the next pending IRQ. */ @@ -353,6 +348,7 @@ int iSeries_get_irq(struct pt_regs *regs) if (hvlpevent_is_pending()) process_hvlpevents(regs); +#ifdef CONFIG_PCI if (num_pending_irqs) { spin_lock(&pending_irqs_lock); for (irq = 0; irq < NR_IRQS; irq++) { @@ -366,6 +362,7 @@ int iSeries_get_irq(struct pt_regs *regs) if (irq >= NR_IRQS) irq = -2; } +#endif return irq; } diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c index ea72385..438e2db 100644 --- a/arch/powerpc/platforms/iseries/lpardata.c +++ b/arch/powerpc/platforms/iseries/lpardata.c @@ -93,10 +93,7 @@ struct ItLpNaca itLpNaca = { .xPirEnvironMode = 0, /* Piranha stuff */ .xPirConsoleMode = 0, .xPirDasdMode = 0, - .xLparInstalled = 0, - .xSysPartitioned = 0, - .xHwSyncedTBs = 0, - .xIntProcUtilHmt = 0, + .flags = 0, .xSpVpdFormat = 0, .xIntProcRatio = 0, .xPlicVrmIndex = 0, /* VRM index of PLIC */ diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index e9fb98b..0b88530 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c @@ -53,7 +53,7 @@ static struct HvLpEvent * get_next_hvlpevent(void) struct HvLpEvent * event; event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; - if (event->xFlags.xValid) { + if (hvlpevent_is_valid(event)) { /* rmb() needed only for weakly consistent machines (regatta) */ rmb(); /* Set pointer to next potential event */ @@ -84,7 +84,7 @@ int hvlpevent_is_pending(void) next_event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; - return next_event->xFlags.xValid | + return hvlpevent_is_valid(next_event) || hvlpevent_queue.xPlicOverflowIntPending; } @@ -101,18 +101,18 @@ static void hvlpevent_clear_valid(struct HvLpEvent * event) switch (extra) { case 3: tmp = (struct HvLpEvent*)((char*)event + 3 * LpEventAlign); - tmp->xFlags.xValid = 0; + hvlpevent_invalidate(tmp); case 2: tmp = (struct HvLpEvent*)((char*)event + 2 * LpEventAlign); - tmp->xFlags.xValid = 0; + hvlpevent_invalidate(tmp); case 1: tmp = (struct HvLpEvent*)((char*)event + 1 * LpEventAlign); - tmp->xFlags.xValid = 0; + hvlpevent_invalidate(tmp); } mb(); - event->xFlags.xValid = 0; + hvlpevent_invalidate(event); } void process_hvlpevents(struct pt_regs *regs) diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index 49e7e4b..a41d8b7 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c @@ -251,10 +251,7 @@ static struct pending_event *new_pending_event(void) } memset(ev, 0, sizeof(struct pending_event)); hev = &ev->event.hp_lp_event; - hev->xFlags.xValid = 1; - hev->xFlags.xAckType = HvLpEvent_AckType_ImmediateAck; - hev->xFlags.xAckInd = HvLpEvent_AckInd_DoAck; - hev->xFlags.xFunction = HvLpEvent_Function_Int; + hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DO_ACK | HV_LP_EVENT_INT; hev->xType = HvLpEvent_Type_MachineFac; hev->xSourceLp = HvLpConfig_getLpIndex(); hev->xTargetLp = primary_lp; @@ -518,17 +515,10 @@ static void handle_ack(struct io_mf_lp_event *event) static void hv_handler(struct HvLpEvent *event, struct pt_regs *regs) { if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) { - switch(event->xFlags.xFunction) { - case HvLpEvent_Function_Ack: + if (hvlpevent_is_ack(event)) handle_ack((struct io_mf_lp_event *)event); - break; - case HvLpEvent_Function_Int: + else handle_int((struct io_mf_lp_event *)event); - break; - default: - printk(KERN_ERR "mf.c: non ack/int event received\n"); - break; - } } else printk(KERN_ERR "mf.c: alien event received\n"); } diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index dafc518..a19833b 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c @@ -43,6 +43,7 @@ #include "irq.h" #include "pci.h" #include "call_pci.h" +#include "iommu.h" extern unsigned long io_page_mask; diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c index 384360e..ad36ab0 100644 --- a/arch/powerpc/platforms/iseries/vio.c +++ b/arch/powerpc/platforms/iseries/vio.c @@ -22,6 +22,8 @@ #include <asm/iseries/hv_lp_config.h> #include <asm/iseries/hv_call_xm.h> +#include "iommu.h" + struct device *iSeries_vio_dev = &vio_bus_device.dev; EXPORT_SYMBOL(iSeries_vio_dev); diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 84267269..622a301 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c @@ -270,7 +270,7 @@ static void handleMonitorEvent(struct HvLpEvent *event) * First see if this is just a normal monitor message from the * other partition */ - if (event->xFlags.xFunction == HvLpEvent_Function_Int) { + if (hvlpevent_is_int(event)) { remoteLp = event->xSourceLp; if (!viopathStatus[remoteLp].isActive) sendMonMsg(remoteLp); @@ -331,13 +331,12 @@ static void handleConfig(struct HvLpEvent *event) { if (!event) return; - if (event->xFlags.xFunction == HvLpEvent_Function_Int) { + if (hvlpevent_is_int(event)) { printk(VIOPATH_KERN_WARN "unexpected config request from partition %d", event->xSourceLp); - if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && - (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) { + if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } @@ -377,7 +376,7 @@ static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK) >> VIOMAJOR_SUBTYPE_SHIFT; - if (event->xFlags.xFunction == HvLpEvent_Function_Int) { + if (hvlpevent_is_int(event)) { remoteLp = event->xSourceLp; /* * The isActive is checked because if the hosting partition @@ -436,8 +435,7 @@ static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) "unexpected virtual io event subtype %d from partition %d\n", event->xSubtype, remoteLp); /* No handler. Ack if necessary */ - if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && - (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) { + if (hvlpevent_is_int(event) && hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 3b1a9d4..89c4c36 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -278,7 +278,7 @@ static void __init l2cr_init(void) } #endif -void __init pmac_setup_arch(void) +static void __init pmac_setup_arch(void) { struct device_node *cpu, *ic; int *fp; diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 17cea7f..8357831 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -208,10 +208,11 @@ static void __eeh_mark_slot (struct device_node *dn, int mode_flag) { while (dn) { if (PCI_DN(dn)) { - PCI_DN(dn)->eeh_mode |= mode_flag; - /* Mark the pci device driver too */ struct pci_dev *dev = PCI_DN(dn)->pcidev; + + PCI_DN(dn)->eeh_mode |= mode_flag; + if (dev && dev->driver) dev->error_state = pci_channel_io_frozen; diff --git a/arch/powerpc/platforms/pseries/hvcserver.c b/arch/powerpc/platforms/pseries/hvcserver.c index 4d58417..22bfb5c 100644 --- a/arch/powerpc/platforms/pseries/hvcserver.c +++ b/arch/powerpc/platforms/pseries/hvcserver.c @@ -40,7 +40,7 @@ MODULE_VERSION(HVCS_ARCH_VERSION); * functions aren't performance sensitive, so this conversion isn't an * issue. */ -int hvcs_convert(long to_convert) +static int hvcs_convert(long to_convert) { switch (to_convert) { case H_Success: @@ -91,7 +91,7 @@ int hvcs_free_partner_info(struct list_head *head) EXPORT_SYMBOL(hvcs_free_partner_info); /* Helper function for hvcs_get_partner_info */ -int hvcs_next_partner(uint32_t unit_address, +static int hvcs_next_partner(uint32_t unit_address, unsigned long last_p_partition_ID, unsigned long last_p_unit_address, unsigned long *pi_buff) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 169f914..48cfbfc 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -51,8 +51,6 @@ #define DBG(fmt...) -extern int is_python(struct device_node *); - static void tce_build_pSeries(struct iommu_table *tbl, long index, long npages, unsigned long uaddr, enum dma_data_direction direction) diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index 2edc947..5064349 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c @@ -192,7 +192,7 @@ struct file_operations scanlog_fops = { .release = scanlog_release, }; -int __init scanlog_init(void) +static int __init scanlog_init(void) { struct proc_dir_entry *ent; @@ -222,7 +222,7 @@ int __init scanlog_init(void) return 0; } -void __exit scanlog_cleanup(void) +static void __exit scanlog_cleanup(void) { if (proc_ppc64_scan_log_dump) { kfree(proc_ppc64_scan_log_dump->data); diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 8903cf6..68b7f08 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -86,7 +86,7 @@ static void pseries_dedicated_idle(void); struct mpic *pSeries_mpic; -void pSeries_show_cpuinfo(struct seq_file *m) +static void pSeries_show_cpuinfo(struct seq_file *m) { struct device_node *root; const char *model = ""; diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 2f543ce..8e6b1ed 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c @@ -93,7 +93,7 @@ static int query_cpu_stopped(unsigned int pcpu) return cpu_status; } -int pSeries_cpu_disable(void) +static int pSeries_cpu_disable(void) { int cpu = smp_processor_id(); @@ -109,7 +109,7 @@ int pSeries_cpu_disable(void) return 0; } -void pSeries_cpu_die(unsigned int cpu) +static void pSeries_cpu_die(unsigned int cpu) { int tries; int cpu_status; diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 0c0cfa3..fd823c7 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c @@ -381,7 +381,7 @@ int xics_get_irq(struct pt_regs *regs) #ifdef CONFIG_SMP -irqreturn_t xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs) { int cpu = smp_processor_id(); |