From c2c4798e04ef836b12f5df04e7d1a1710cb39301 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Thu, 26 Oct 2006 10:06:07 -0600 Subject: [PARISC] sparse fixes 0/NULL, missing __user, missing __iomem, non-ANSI prototype. Signed-off-by: Matthew Wilcox Signed-off-by: Kyle McMartin --- arch/parisc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/parisc/kernel') diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 2f9f9dfa66f..dfca014b49b 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -355,8 +355,8 @@ asmlinkage int sys_execve(struct pt_regs *regs) error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; - error = do_execve(filename, (char __user **) regs->gr[25], - (char __user **) regs->gr[24], regs); + error = do_execve(filename, (char __user * __user *) regs->gr[25], + (char __user * __user *) regs->gr[24], regs); if (error == 0) { task_lock(current); current->ptrace &= ~PT_DTRACE; -- cgit v1.2.3 From e51ec241784f516ad3a916a24ac936364cd10d63 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Sun, 5 Nov 2006 15:24:48 -0700 Subject: [PARISC] more sparse fixes 0/NULL changes, __user annotations, __iomem annotations Signed-off-by: Matthew Wilcox Signed-off-by: Kyle McMartin --- arch/parisc/kernel/pci-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/parisc/kernel') diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index a6caf107308..0c3aecb85a5 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c @@ -342,7 +342,7 @@ pcxl_dma_init(void) pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL, get_order(pcxl_res_size)); memset(pcxl_res_map, 0, pcxl_res_size); - proc_gsc_root = proc_mkdir("gsc", 0); + proc_gsc_root = proc_mkdir("gsc", NULL); if (!proc_gsc_root) printk(KERN_WARNING "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); -- cgit v1.2.3 From 3ee8f5e2cdd83b869f1b55e08eb26a87889b62f9 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Sat, 14 Oct 2006 20:02:15 +0200 Subject: [PARISC] avoid compiler warnings when compiling 64bit Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- arch/parisc/kernel/drivers.c | 8 +++++--- arch/parisc/kernel/pci.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'arch/parisc/kernel') diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index d6c486e9501..6274cd268e6 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -689,7 +689,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath) .fn = check_parent, }; - device_for_each_child(parent, &recurse_data, descend_children); + if (device_for_each_child(parent, &recurse_data, descend_children)) + /* nothing */; + return d.dev; } @@ -835,8 +837,8 @@ static void print_parisc_device(struct parisc_device *dev) static int count; print_pa_hwpath(dev, hw_path); - printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", - ++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type, + printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", + ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type, dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); if (dev->num_addrs) { diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 199887a61c7..563df0072de 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c @@ -200,8 +200,8 @@ static void pcibios_link_hba_resources( struct resource *hba_res, struct resource *r) { if (!r->parent) { - printk(KERN_EMERG "PCI: resource not parented! [%lx-%lx]\n", - r->start, r->end); + printk(KERN_EMERG "PCI: resource not parented! [%p-%p]\n", + (void*) r->start, (void*) r->end); r->parent = hba_res; /* reverse link is harder *sigh* */ -- cgit v1.2.3 From f8fc18a1323c3f4171a643d6ebf1597f4ba8bc53 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Wed, 18 Oct 2006 21:44:30 +0200 Subject: [TRIVIAL] [PARISC] Fix module.c printk message, add missing ')' Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- arch/parisc/kernel/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/parisc/kernel') diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index f50b982b083..47ea4e4a217 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr, me->name, strtab, symhdr); if(me->arch.got_count > MAX_GOTS) { - printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS); + printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n", + me->name, me->arch.got_count, MAX_GOTS); return -EINVAL; } -- cgit v1.2.3 From 3c97b5e93faf9262407835046effc886efefa0a6 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 7 Dec 2006 23:52:27 -0500 Subject: [PARISC] Move spinlock_t out of struct cpu_data Signed-off-by: Kyle McMartin --- arch/parisc/kernel/smp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'arch/parisc/kernel') diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 4a23a97b06c..5b6bc6e8a42 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -76,6 +76,7 @@ cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; /* Bitmap of Present CP EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(cpu_possible_map); +DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED; struct smp_call_struct { void (*func) (void *info); @@ -167,10 +168,11 @@ ipi_interrupt(int irq, void *dev_id) mb(); /* Order interrupt and bit testing. */ for (;;) { - spin_lock_irqsave(&(p->lock),flags); + spinlock_t *lock = &per_cpu(ipi_lock, this_cpu); + spin_lock_irqsave(lock, flags); ops = p->pending_ipi; p->pending_ipi = 0; - spin_unlock_irqrestore(&(p->lock),flags); + spin_unlock_irqrestore(lock, flags); mb(); /* Order bit clearing and data access. */ @@ -275,12 +277,13 @@ static inline void ipi_send(int cpu, enum ipi_message_type op) { struct cpuinfo_parisc *p = &cpu_data[cpu]; + spinlock_t *lock = &per_cpu(ipi_lock, cpu); unsigned long flags; - spin_lock_irqsave(&(p->lock),flags); + spin_lock_irqsave(lock, flags); p->pending_ipi |= 1 << op; gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa); - spin_unlock_irqrestore(&(p->lock),flags); + spin_unlock_irqrestore(lock, flags); } -- cgit v1.2.3 From f41464fd84463dee89d53750cb74f6be30b31620 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 11 Dec 2006 21:03:18 -0500 Subject: [PARISC] Fix thinko in cpu_data.lock removal Need to remove the initializer as well. Doh. Signed-off-by: Kyle McMartin --- arch/parisc/kernel/processor.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/parisc/kernel') diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index fb81e5687e7..0af1fad2fc6 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -153,8 +153,6 @@ static int __init processor_probe(struct parisc_device *dev) p->cpuid = cpuid; /* save CPU id */ p->txn_addr = txn_addr; /* save CPU IRQ address */ #ifdef CONFIG_SMP - spin_lock_init(&p->lock); - /* ** FIXME: review if any other initialization is clobbered ** for boot_cpu by the above memset(). -- cgit v1.2.3