diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/Makefile | 9 | ||||
-rw-r--r-- | arch/sparc64/kernel/binfmt_elf32.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/central.c | 9 | ||||
-rw-r--r-- | arch/sparc64/kernel/chmc.c | 16 | ||||
-rw-r--r-- | arch/sparc64/kernel/ds.c | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/iommu.c | 7 | ||||
-rw-r--r-- | arch/sparc64/kernel/iommu_common.c | 18 | ||||
-rw-r--r-- | arch/sparc64/kernel/irq.c | 85 | ||||
-rw-r--r-- | arch/sparc64/kernel/isa.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/ldc.c | 19 | ||||
-rw-r--r-- | arch/sparc64/kernel/module.c | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_msi.c | 14 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_sun4v.c | 11 | ||||
-rw-r--r-- | arch/sparc64/kernel/semaphore.c | 5 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 9 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sparc.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sparc32.c | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys_sunos32.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/traps.c | 11 |
22 files changed, 115 insertions, 121 deletions
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 112c46e6657..ef50d217432 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile @@ -39,12 +39,3 @@ else obj-y += sys_sunos32.o sunos_ioctl32.o endif endif - -ifneq ($(NEW_GCC),y) - CMODEL_CFLAG := -mmedlow -else - CMODEL_CFLAG := -m64 -mcmodel=medlow -endif - -head.o: head.S ttable.S itlb_miss.S dtlb_miss.S ktlb.S tsb.S \ - etrap.S rtrap.S winfixup.S entry.S diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c index 9ad84ff10a1..1587a29a4b0 100644 --- a/arch/sparc64/kernel/binfmt_elf32.c +++ b/arch/sparc64/kernel/binfmt_elf32.c @@ -1,7 +1,7 @@ /* * binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra. * - * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com) + * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@davemloft.net) * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) */ @@ -133,7 +133,7 @@ struct elf_prpsinfo32 #undef cputime_to_timeval #define cputime_to_timeval cputime_to_compat_timeval -static __inline__ void +static inline void cputime_to_compat_timeval(const cputime_t cputime, struct compat_timeval *value) { unsigned long jiffies = cputime_to_jiffies(cputime); diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c index 8230099f0d8..b61b8dfb09c 100644 --- a/arch/sparc64/kernel/central.c +++ b/arch/sparc64/kernel/central.c @@ -1,7 +1,6 @@ -/* $Id: central.c,v 1.15 2001/12/19 00:29:51 davem Exp $ - * central.c: Central FHC driver for Sunfire/Starfire/Wildfire. +/* central.c: Central FHC driver for Sunfire/Starfire/Wildfire. * - * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) + * Copyright (C) 1997, 1999 David S. Miller (davem@davemloft.net) */ #include <linux/kernel.h> @@ -385,7 +384,7 @@ void __init central_probe(void) init_all_fhc_hw(); } -static __inline__ void fhc_ledblink(struct linux_fhc *fhc, int on) +static inline void fhc_ledblink(struct linux_fhc *fhc, int on) { u32 tmp; @@ -402,7 +401,7 @@ static __inline__ void fhc_ledblink(struct linux_fhc *fhc, int on) upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_CTRL); } -static __inline__ void central_ledblink(struct linux_central *central, int on) +static inline void central_ledblink(struct linux_central *central, int on) { u8 tmp; diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 777d3457704..6d4f02e8a4c 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c @@ -1,7 +1,6 @@ -/* $Id: chmc.c,v 1.4 2002/01/08 16:00:14 davem Exp $ - * memctrlr.c: Driver for UltraSPARC-III memory controller. +/* memctrlr.c: Driver for UltraSPARC-III memory controller. * - * Copyright (C) 2001 David S. Miller (davem@redhat.com) + * Copyright (C) 2001, 2007 David S. Miller (davem@davemloft.net) */ #include <linux/module.h> @@ -16,6 +15,7 @@ #include <linux/init.h> #include <asm/spitfire.h> #include <asm/chmctrl.h> +#include <asm/cpudata.h> #include <asm/oplib.h> #include <asm/prom.h> #include <asm/io.h> @@ -242,8 +242,11 @@ int chmc_getunumber(int syndrome_code, */ static u64 read_mcreg(struct mctrl_info *mp, unsigned long offset) { - unsigned long ret; - int this_cpu = get_cpu(); + unsigned long ret, this_cpu; + + preempt_disable(); + + this_cpu = real_hard_smp_processor_id(); if (mp->portid == this_cpu) { __asm__ __volatile__("ldxa [%1] %2, %0" @@ -255,7 +258,8 @@ static u64 read_mcreg(struct mctrl_info *mp, unsigned long offset) : "r" (mp->regs + offset), "i" (ASI_PHYS_BYPASS_EC_E)); } - put_cpu(); + + preempt_enable(); return ret; } diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index 9f472a79d37..eeb5a2fc788 100644 --- a/arch/sparc64/kernel/ds.c +++ b/arch/sparc64/kernel/ds.c @@ -6,7 +6,6 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/types.h> -#include <linux/module.h> #include <linux/string.h> #include <linux/slab.h> #include <linux/sched.h> diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index 29af777d7ac..070a4846c0c 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c @@ -472,8 +472,7 @@ static void dma_4u_unmap_single(struct device *dev, dma_addr_t bus_addr, spin_unlock_irqrestore(&iommu->lock, flags); } -#define SG_ENT_PHYS_ADDRESS(SG) \ - (__pa(page_address((SG)->page)) + (SG)->offset) +#define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG)))) static void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, int nelems, @@ -565,9 +564,7 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist, /* Fast path single entry scatterlists. */ if (nelems == 1) { sglist->dma_address = - dma_4u_map_single(dev, - (page_address(sglist->page) + - sglist->offset), + dma_4u_map_single(dev, sg_virt(sglist), sglist->length, direction); if (unlikely(sglist->dma_address == DMA_ERROR_CODE)) return 0; diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c index d7ca900ec51..efd5dff85f6 100644 --- a/arch/sparc64/kernel/iommu_common.c +++ b/arch/sparc64/kernel/iommu_common.c @@ -73,7 +73,7 @@ static int verify_one_map(struct scatterlist *dma_sg, struct scatterlist **__sg, daddr = dma_sg->dma_address; sglen = sg->length; - sgaddr = (unsigned long) (page_address(sg->page) + sg->offset); + sgaddr = (unsigned long) sg_virt(sg); while (dlen > 0) { unsigned long paddr; @@ -123,7 +123,7 @@ static int verify_one_map(struct scatterlist *dma_sg, struct scatterlist **__sg, sg = sg_next(sg); if (--nents <= 0) break; - sgaddr = (unsigned long) (page_address(sg->page) + sg->offset); + sgaddr = (unsigned long) sg_virt(sg); sglen = sg->length; } if (dlen < 0) { @@ -191,7 +191,7 @@ void verify_sglist(struct scatterlist *sglist, int nents, iopte_t *iopte, int np printk("sg(%d): page_addr(%p) off(%x) length(%x) " "dma_address[%016x] dma_length[%016x]\n", i, - page_address(sg->page), sg->offset, + page_address(sg_page(sg)), sg->offset, sg->length, sg->dma_address, sg->dma_length); } @@ -207,15 +207,14 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) unsigned long prev; u32 dent_addr, dent_len; - prev = (unsigned long) (page_address(sg->page) + sg->offset); + prev = (unsigned long) sg_virt(sg); prev += (unsigned long) (dent_len = sg->length); - dent_addr = (u32) ((unsigned long)(page_address(sg->page) + sg->offset) - & (IO_PAGE_SIZE - 1UL)); + dent_addr = (u32) ((unsigned long)(sg_virt(sg)) & (IO_PAGE_SIZE - 1UL)); while (--nents) { unsigned long addr; sg = sg_next(sg); - addr = (unsigned long) (page_address(sg->page) + sg->offset); + addr = (unsigned long) sg_virt(sg); if (! VCONTIG(prev, addr)) { dma_sg->dma_address = dent_addr; dma_sg->dma_length = dent_len; @@ -234,6 +233,11 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) dma_sg->dma_address = dent_addr; dma_sg->dma_length = dent_len; + if (dma_sg != sg) { + dma_sg = sg_next(dma_sg); + dma_sg->dma_length = 0; + } + return ((unsigned long) dent_addr + (unsigned long) dent_len + (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT; diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 2c3bea22815..30431bd24e1 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -257,8 +257,8 @@ struct irq_handler_data { unsigned long imap; void (*pre_handler)(unsigned int, void *, void *); - void *pre_handler_arg1; - void *pre_handler_arg2; + void *arg1; + void *arg2; }; #ifdef CONFIG_SMP @@ -346,7 +346,7 @@ static void sun4u_irq_disable(unsigned int virt_irq) } } -static void sun4u_irq_end(unsigned int virt_irq) +static void sun4u_irq_eoi(unsigned int virt_irq) { struct irq_handler_data *data = get_irq_chip_data(virt_irq); struct irq_desc *desc = irq_desc + virt_irq; @@ -401,7 +401,7 @@ static void sun4v_irq_disable(unsigned int virt_irq) "err(%d)\n", ino, err); } -static void sun4v_irq_end(unsigned int virt_irq) +static void sun4v_irq_eoi(unsigned int virt_irq) { unsigned int ino = virt_irq_table[virt_irq].dev_ino; struct irq_desc *desc = irq_desc + virt_irq; @@ -478,7 +478,7 @@ static void sun4v_virq_disable(unsigned int virt_irq) dev_handle, dev_ino, err); } -static void sun4v_virq_end(unsigned int virt_irq) +static void sun4v_virq_eoi(unsigned int virt_irq) { struct irq_desc *desc = irq_desc + virt_irq; unsigned long dev_handle, dev_ino; @@ -498,33 +498,11 @@ static void sun4v_virq_end(unsigned int virt_irq) dev_handle, dev_ino, err); } -static void run_pre_handler(unsigned int virt_irq) -{ - struct irq_handler_data *data = get_irq_chip_data(virt_irq); - unsigned int ino; - - ino = virt_irq_table[virt_irq].dev_ino; - if (likely(data->pre_handler)) { - data->pre_handler(ino, - data->pre_handler_arg1, - data->pre_handler_arg2); - } -} - static struct irq_chip sun4u_irq = { .typename = "sun4u", .enable = sun4u_irq_enable, .disable = sun4u_irq_disable, - .end = sun4u_irq_end, - .set_affinity = sun4u_set_affinity, -}; - -static struct irq_chip sun4u_irq_ack = { - .typename = "sun4u+ack", - .enable = sun4u_irq_enable, - .disable = sun4u_irq_disable, - .ack = run_pre_handler, - .end = sun4u_irq_end, + .eoi = sun4u_irq_eoi, .set_affinity = sun4u_set_affinity, }; @@ -532,7 +510,7 @@ static struct irq_chip sun4v_irq = { .typename = "sun4v", .enable = sun4v_irq_enable, .disable = sun4v_irq_disable, - .end = sun4v_irq_end, + .eoi = sun4v_irq_eoi, .set_affinity = sun4v_set_affinity, }; @@ -540,31 +518,33 @@ static struct irq_chip sun4v_virq = { .typename = "vsun4v", .enable = sun4v_virq_enable, .disable = sun4v_virq_disable, - .end = sun4v_virq_end, + .eoi = sun4v_virq_eoi, .set_affinity = sun4v_virt_set_affinity, }; +static void fastcall pre_flow_handler(unsigned int virt_irq, + struct irq_desc *desc) +{ + struct irq_handler_data *data = get_irq_chip_data(virt_irq); + unsigned int ino = virt_irq_table[virt_irq].dev_ino; + + data->pre_handler(ino, data->arg1, data->arg2); + + handle_fasteoi_irq(virt_irq, desc); +} + void irq_install_pre_handler(int virt_irq, void (*func)(unsigned int, void *, void *), void *arg1, void *arg2) { struct irq_handler_data *data = get_irq_chip_data(virt_irq); - struct irq_chip *chip = get_irq_chip(virt_irq); - - if (WARN_ON(chip == &sun4v_irq || chip == &sun4v_virq)) { - printk(KERN_ERR "IRQ: Trying to install pre-handler on " - "sun4v irq %u\n", virt_irq); - return; - } + struct irq_desc *desc = irq_desc + virt_irq; data->pre_handler = func; - data->pre_handler_arg1 = arg1; - data->pre_handler_arg2 = arg2; - - if (chip == &sun4u_irq_ack) - return; + data->arg1 = arg1; + data->arg2 = arg2; - set_irq_chip(virt_irq, &sun4u_irq_ack); + desc->handle_irq = pre_flow_handler; } unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) @@ -582,7 +562,10 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) if (!virt_irq) { virt_irq = virt_irq_alloc(0, ino); bucket_set_virt_irq(__pa(bucket), virt_irq); - set_irq_chip(virt_irq, &sun4u_irq); + set_irq_chip_and_handler_name(virt_irq, + &sun4u_irq, + handle_fasteoi_irq, + "IVEC"); } data = get_irq_chip_data(virt_irq); @@ -617,7 +600,9 @@ static unsigned int sun4v_build_common(unsigned long sysino, if (!virt_irq) { virt_irq = virt_irq_alloc(0, sysino); bucket_set_virt_irq(__pa(bucket), virt_irq); - set_irq_chip(virt_irq, chip); + set_irq_chip_and_handler_name(virt_irq, chip, + handle_fasteoi_irq, + "IVEC"); } data = get_irq_chip_data(virt_irq); @@ -665,7 +650,10 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) virt_irq = virt_irq_alloc(devhandle, devino); bucket_set_virt_irq(__pa(bucket), virt_irq); - set_irq_chip(virt_irq, &sun4v_virq); + + set_irq_chip_and_handler_name(virt_irq, &sun4v_virq, + handle_fasteoi_irq, + "IVEC"); data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); if (unlikely(!data)) @@ -724,6 +712,7 @@ void handler_irq(int irq, struct pt_regs *regs) : "memory"); while (bucket_pa) { + struct irq_desc *desc; unsigned long next_pa; unsigned int virt_irq; @@ -731,7 +720,9 @@ void handler_irq(int irq, struct pt_regs *regs) virt_irq = bucket_get_virt_irq(bucket_pa); bucket_clear_chain_pa(bucket_pa); - __do_IRQ(virt_irq); + desc = irq_desc + virt_irq; + + desc->handle_irq(virt_irq, desc); bucket_pa = next_pa; } diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index 0f19dce1c90..b5f7b354084 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c @@ -155,6 +155,7 @@ void __init isa_init(void) isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL); if (!isa_br) { printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); + pci_dev_put(pdev); return; } @@ -168,6 +169,7 @@ void __init isa_init(void) printk(KERN_DEBUG "isa: device registration error for %s!\n", dp->path_component_name); kfree(isa_br); + pci_dev_put(pdev); return; } diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c index 85a2be0b096..63969f61028 100644 --- a/arch/sparc64/kernel/ldc.c +++ b/arch/sparc64/kernel/ldc.c @@ -2057,7 +2057,7 @@ static void fill_cookies(struct cookie_state *sp, unsigned long pa, static int sg_count_one(struct scatterlist *sg) { - unsigned long base = page_to_pfn(sg->page) << PAGE_SHIFT; + unsigned long base = page_to_pfn(sg_page(sg)) << PAGE_SHIFT; long len = sg->length; if ((sg->offset | len) & (8UL - 1)) @@ -2121,7 +2121,7 @@ int ldc_map_sg(struct ldc_channel *lp, state.nc = 0; for (i = 0; i < num_sg; i++) - fill_cookies(&state, page_to_pfn(sg[i].page) << PAGE_SHIFT, + fill_cookies(&state, page_to_pfn(sg_page(&sg[i])) << PAGE_SHIFT, sg[i].offset, sg[i].length); return state.nc; @@ -2338,6 +2338,7 @@ static int __init ldc_init(void) unsigned long major, minor; struct mdesc_handle *hp; const u64 *v; + int err; u64 mp; hp = mdesc_grab(); @@ -2345,29 +2346,33 @@ static int __init ldc_init(void) return -ENODEV; mp = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform"); + err = -ENODEV; if (mp == MDESC_NODE_NULL) - return -ENODEV; + goto out; v = mdesc_get_property(hp, mp, "domaining-enabled", NULL); if (!v) - return -ENODEV; + goto out; major = 1; minor = 0; if (sun4v_hvapi_register(HV_GRP_LDOM, major, &minor)) { printk(KERN_INFO PFX "Could not register LDOM hvapi.\n"); - return -ENODEV; + goto out; } printk(KERN_INFO "%s", version); if (!*v) { printk(KERN_INFO PFX "Domaining disabled.\n"); - return -ENODEV; + goto out; } ldom_domaining_enabled = 1; + err = 0; - return 0; +out: + mdesc_release(hp); + return err; } core_initcall(ldc_init); diff --git a/arch/sparc64/kernel/module.c b/arch/sparc64/kernel/module.c index 57987152769..158484bf599 100644 --- a/arch/sparc64/kernel/module.c +++ b/arch/sparc64/kernel/module.c @@ -11,7 +11,6 @@ #include <linux/fs.h> #include <linux/string.h> #include <linux/slab.h> -#include <linux/vmalloc.h> #include <linux/mm.h> #include <asm/processor.h> diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 9b808640a19..63b3ebc0c3c 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -207,8 +207,7 @@ static struct { { "SUNW,sun4v-pci", sun4v_pci_init }, { "pciex108e,80f0", fire_pci_init }, }; -#define PCI_NUM_CONTROLLER_TYPES (sizeof(pci_controller_table) / \ - sizeof(pci_controller_table[0])) +#define PCI_NUM_CONTROLLER_TYPES ARRAY_SIZE(pci_controller_table) static int __init pci_controller_init(const char *model_name, int namelen, struct device_node *dp) { diff --git a/arch/sparc64/kernel/pci_msi.c b/arch/sparc64/kernel/pci_msi.c index 31a165fd3e4..d6d64b44af6 100644 --- a/arch/sparc64/kernel/pci_msi.c +++ b/arch/sparc64/kernel/pci_msi.c @@ -28,8 +28,15 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie) unsigned long msi; err = ops->dequeue_msi(pbm, msiqid, &head, &msi); - if (likely(err > 0)) - __do_IRQ(pbm->msi_irq_table[msi - pbm->msi_first]); + if (likely(err > 0)) { + struct irq_desc *desc; + unsigned int virt_irq; + + virt_irq = pbm->msi_irq_table[msi - pbm->msi_first]; + desc = irq_desc + virt_irq; + + desc->handle_irq(virt_irq, desc); + } if (unlikely(err < 0)) goto err_dequeue; @@ -128,7 +135,8 @@ int sparc64_setup_msi_irq(unsigned int *virt_irq_p, if (!*virt_irq_p) goto out_err; - set_irq_chip(*virt_irq_p, &msi_irq); + set_irq_chip_and_handler_name(*virt_irq_p, &msi_irq, + handle_simple_irq, "MSI"); err = alloc_msi(pbm); if (unlikely(err < 0)) diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index fe46ace3e59..e587a372f3f 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c @@ -365,8 +365,7 @@ static void dma_4v_unmap_single(struct device *dev, dma_addr_t bus_addr, spin_unlock_irqrestore(&iommu->lock, flags); } -#define SG_ENT_PHYS_ADDRESS(SG) \ - (__pa(page_address((SG)->page)) + (SG)->offset) +#define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG)))) static long fill_sg(long entry, struct device *dev, struct scatterlist *sg, @@ -477,9 +476,7 @@ static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist, /* Fast path single entry scatterlists. */ if (nelems == 1) { sglist->dma_address = - dma_4v_map_single(dev, - (page_address(sglist->page) + - sglist->offset), + dma_4v_map_single(dev, sg_virt(sglist), sglist->length, direction); if (unlikely(sglist->dma_address == DMA_ERROR_CODE)) return 0; @@ -1025,6 +1022,10 @@ void __init sun4v_pci_init(struct device_node *dp, char *model_name) } prop = of_find_property(dp, "reg", NULL); + if (!prop) { + prom_printf("SUN4V_PCI: Could not find config registers\n"); + prom_halt(); + } regs = prop->value; devhandle = (regs->phys_addr >> 32UL) & 0x0fffffff; diff --git a/arch/sparc64/kernel/semaphore.c b/arch/sparc64/kernel/semaphore.c index a809e63f03e..9974a689955 100644 --- a/arch/sparc64/kernel/semaphore.c +++ b/arch/sparc64/kernel/semaphore.c @@ -1,5 +1,4 @@ -/* $Id: semaphore.c,v 1.9 2001/11/18 00:12:56 davem Exp $ - * semaphore.c: Sparc64 semaphore implementation. +/* semaphore.c: Sparc64 semaphore implementation. * * This is basically the PPC semaphore scheme ported to use * the sparc64 atomic instructions, so see the PPC code for @@ -19,7 +18,7 @@ * sem->count = tmp; * return old_count; */ -static __inline__ int __sem_update_count(struct semaphore *sem, int incr) +static inline int __sem_update_count(struct semaphore *sem, int incr) { int old_count, tmp; diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 407d74a8a54..894b506f963 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -236,8 +236,9 @@ void smp_synchronize_tick_client(void) t[i].rt, t[i].master, t[i].diff, t[i].lat); #endif - printk(KERN_INFO "CPU %d: synchronized TICK with master CPU (last diff %ld cycles," - "maxerr %lu cycles)\n", smp_processor_id(), delta, rt); + printk(KERN_INFO "CPU %d: synchronized TICK with master CPU " + "(last diff %ld cycles, maxerr %lu cycles)\n", + smp_processor_id(), delta, rt); } static void smp_start_sync_tick_client(int cpu); @@ -459,7 +460,7 @@ again: } } -static __inline__ void spitfire_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask) +static inline void spitfire_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask) { u64 pstate; int i; @@ -906,7 +907,7 @@ extern atomic_t dcpage_flushes; extern atomic_t dcpage_flushes_xcall; #endif -static __inline__ void __local_flush_dcache_page(struct page *page) +static inline void __local_flush_dcache_page(struct page *page) { #ifdef DCACHE_ALIASING_POSSIBLE __flush_dcache_page(page_address(page), diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 23fad7ebdd0..60765e314bd 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -221,7 +221,7 @@ EXPORT_SYMBOL(pci_dma_supported); /* I/O device mmaping on Sparc64. */ EXPORT_SYMBOL(io_remap_pfn_range); -#ifdef CONFIG_COMPAT +#if defined(CONFIG_COMPAT) && defined(CONFIG_NET) /* Solaris/SunOS binary compatibility */ EXPORT_SYMBOL(verify_compat_iovec); #endif diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 560cb1edb1d..c56573a10ee 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -318,7 +318,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u if (flags & MAP_FIXED) { /* Ok, don't mess with it. */ - return get_unmapped_area(NULL, addr, len, pgoff, flags); + return get_unmapped_area(NULL, orig_addr, len, pgoff, flags); } flags &= ~MAP_SHARED; diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 78caff92673..98c468803ce 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -51,7 +51,6 @@ #include <linux/vfs.h> #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/ptrace.h> -#include <linux/highuid.h> #include <asm/types.h> #include <asm/uaccess.h> diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 8f7a06e2c7e..cfc22d3fe54 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c @@ -57,7 +57,6 @@ #include <linux/personality.h> /* For SOCKET_I */ -#include <linux/socket.h> #include <net/sock.h> #include <net/compat.h> @@ -831,7 +830,7 @@ asmlinkage int sunos_killpg(int pgrp, int sig) rcu_read_lock(); ret = -EINVAL; if (pgrp > 0) - ret = kill_pgrp(find_pid(pgrp), sig, 0); + ret = kill_pgrp(find_vpid(pgrp), sig, 0); rcu_read_unlock(); return ret; diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index cd8c740cba1..4352ee4d8da 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -28,7 +28,6 @@ #include <linux/jiffies.h> #include <linux/cpufreq.h> #include <linux/percpu.h> -#include <linux/profile.h> #include <linux/miscdevice.h> #include <linux/rtc.h> #include <linux/kernel_stat.h> @@ -47,7 +46,6 @@ #include <asm/sections.h> #include <asm/cpudata.h> #include <asm/uaccess.h> -#include <asm/prom.h> #include <asm/irq_regs.h> DEFINE_SPINLOCK(mostek_lock); @@ -1070,7 +1068,7 @@ static int set_rtc_mmss(unsigned long nowtime) * Not having a register set can lead to trouble. * Also starfire doesn't have a tod clock. */ - if (!mregs && !dregs & !bregs) + if (!mregs && !dregs && !bregs) return -1; if (mregs) { diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 34573a55b6e..04998388259 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c @@ -1,7 +1,6 @@ -/* $Id: traps.c,v 1.85 2002/02/09 19:49:31 davem Exp $ - * arch/sparc64/kernel/traps.c +/* arch/sparc64/kernel/traps.c * - * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1995,1997 David S. Miller (davem@davemloft.net) * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) */ @@ -765,7 +764,7 @@ static unsigned long cheetah_afsr_errors; */ struct cheetah_err_info *cheetah_error_log; -static __inline__ struct cheetah_err_info *cheetah_get_error_log(unsigned long afsr) +static inline struct cheetah_err_info *cheetah_get_error_log(unsigned long afsr) { struct cheetah_err_info *p; int cpu = smp_processor_id(); @@ -1085,7 +1084,7 @@ static unsigned char cheetah_mtag_syntab[] = { }; /* Return the highest priority error conditon mentioned. */ -static __inline__ unsigned long cheetah_get_hipri(unsigned long afsr) +static inline unsigned long cheetah_get_hipri(unsigned long afsr) { unsigned long tmp = 0; int i; @@ -2225,7 +2224,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) " /_| \\__/ |_\\\n" " \\__U_/\n"); - printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); + printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); __asm__ __volatile__("flushw"); __show_regs(regs); |