From e448372c79c49ef80df23496339ce0915abef76e Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 13 Jan 2009 20:52:46 +0100 Subject: parisc: fix `struct pt_regs' declared inside parameter list warning Fix those compile warnings: uaccess.h:244: warning: `struct pt_regs' declared inside parameter list uaccess.h:244: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- arch/parisc/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/parisc/include') diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 1c6dbb6f6e5..cd4c0b2a8e7 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h @@ -241,6 +241,7 @@ unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned lo #define __copy_to_user_inatomic __copy_to_user #define __copy_from_user_inatomic __copy_from_user +struct pt_regs; int fixup_exception(struct pt_regs *regs); #endif /* __PARISC_UACCESS_H */ -- cgit v1.2.3 From 2cfeb9a6755d4d7be1026422b6aced48e3bad492 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Sun, 18 Jan 2009 18:13:53 +0100 Subject: parisc: add braces around arguments in assembler macros Add braces around the macro arguments, else for example "shl %r1, 5-3, %r2" would not expand to what you would assume. Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- arch/parisc/include/asm/assembly.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/parisc/include') diff --git a/arch/parisc/include/asm/assembly.h b/arch/parisc/include/asm/assembly.h index ffb208840ec..ab7cc373ee5 100644 --- a/arch/parisc/include/asm/assembly.h +++ b/arch/parisc/include/asm/assembly.h @@ -129,27 +129,27 @@ /* Shift Left - note the r and t can NOT be the same! */ .macro shl r, sa, t - dep,z \r, 31-\sa, 32-\sa, \t + dep,z \r, 31-(\sa), 32-(\sa), \t .endm /* The PA 2.0 shift left */ .macro shlw r, sa, t - depw,z \r, 31-\sa, 32-\sa, \t + depw,z \r, 31-(\sa), 32-(\sa), \t .endm /* And the PA 2.0W shift left */ .macro shld r, sa, t - depd,z \r, 63-\sa, 64-\sa, \t + depd,z \r, 63-(\sa), 64-(\sa), \t .endm /* Shift Right - note the r and t can NOT be the same! */ .macro shr r, sa, t - extru \r, 31-\sa, 32-\sa, \t + extru \r, 31-(\sa), 32-(\sa), \t .endm /* pa20w version of shift right */ .macro shrd r, sa, t - extrd,u \r, 63-\sa, 64-\sa, \t + extrd,u \r, 63-(\sa), 64-(\sa), \t .endm /* load 32-bit 'value' into 'reg' compensating for the ldil -- cgit v1.2.3 From c1da90fd099531e9449019dc53a5a02a5eaef2b4 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Mon, 26 Jan 2009 22:24:38 +0100 Subject: parisc: fix 64bit build Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- arch/parisc/include/asm/assembly.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/parisc/include') diff --git a/arch/parisc/include/asm/assembly.h b/arch/parisc/include/asm/assembly.h index ab7cc373ee5..89fb40005e3 100644 --- a/arch/parisc/include/asm/assembly.h +++ b/arch/parisc/include/asm/assembly.h @@ -79,6 +79,7 @@ #include #include +#include #include -- cgit v1.2.3 From 9dfe914da83ebc88f85d94b4d30d0e45882766d1 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 16 Feb 2009 03:05:02 -0500 Subject: parisc: convert (read|write)bwlq to inlines Kills the 'value computed but not used' due to leX_to_cpu. Signed-off-by: Kyle McMartin --- arch/parisc/include/asm/io.h | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) (limited to 'arch/parisc/include') diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index d3031d1f9d0..1fa905ea53d 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h @@ -174,15 +174,39 @@ static inline void __raw_writeq(unsigned long long b, volatile void __iomem *add *(volatile unsigned long long __force *) addr = b; } -/* readb can never be const, so use __fswab instead of le*_to_cpu */ -#define readb(addr) __raw_readb(addr) -#define readw(addr) le16_to_cpu(__raw_readw(addr)) -#define readl(addr) le32_to_cpu(__raw_readl(addr)) -#define readq(addr) le64_to_cpu(__raw_readq(addr)) -#define writeb(b, addr) __raw_writeb(b, addr) -#define writew(b, addr) __raw_writew(cpu_to_le16(b), addr) -#define writel(b, addr) __raw_writel(cpu_to_le32(b), addr) -#define writeq(b, addr) __raw_writeq(cpu_to_le64(b), addr) +static inline unsigned char readb(const volatile void __iomem *addr) +{ + return __raw_readb(addr); +} +static inline unsigned short readw(const volatile void __iomem *addr) +{ + return le16_to_cpu(__raw_readw(addr)); +} +static inline unsigned int readl(const volatile void __iomem *addr) +{ + return le32_to_cpu(__raw_readl(addr)); +} +static inline unsigned long long readq(const volatile void __iomem *addr) +{ + return le64_to_cpu(__raw_readq(addr)); +} + +static inline void writeb(unsigned char b, volatile void __iomem *addr) +{ + __raw_writeb(b, addr); +} +static inline void writew(unsigned short w, volatile void __iomem *addr) +{ + __raw_writew(cpu_to_le16(w), addr); +} +static inline void writel(unsigned int l, volatile void __iomem *addr) +{ + __raw_writel(cpu_to_le32(l), addr); +} +static inline void writeq(unsigned long long q, volatile void __iomem *addr) +{ + __raw_writeq(cpu_to_le64(q), addr); +} #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) -- cgit v1.2.3 From 8b6649c575e0d8312f62fe643ae43558892da2e1 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 16 Feb 2009 03:20:54 -0500 Subject: parisc: convert cpu_check_affinity to new cpumask api cpumask arg to the affinity function is now const, sort that out through the irq_desc implementations. Signed-off-by: Kyle McMartin --- arch/parisc/include/asm/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/parisc/include') diff --git a/arch/parisc/include/asm/irq.h b/arch/parisc/include/asm/irq.h index 399c81981ed..dfa26b67f91 100644 --- a/arch/parisc/include/asm/irq.h +++ b/arch/parisc/include/asm/irq.h @@ -49,7 +49,7 @@ extern unsigned long txn_alloc_addr(unsigned int); extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); -extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest); +extern int cpu_check_affinity(unsigned int irq, const struct cpumask *dest); /* soft power switch support (power.c) */ extern struct tasklet_struct power_tasklet; -- cgit v1.2.3 From 0cb385e3ff54ee095d9873209f4da764dfb17fec Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Tue, 17 Feb 2009 12:42:52 -0500 Subject: parisc: define x->x mmio accessors Bloody inconsiderate driver writers... Signed-off-by: Kyle McMartin --- arch/parisc/include/asm/io.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/parisc/include') diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index 1fa905ea53d..1f6d2ae7aba 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h @@ -208,6 +208,15 @@ static inline void writeq(unsigned long long q, volatile void __iomem *addr) __raw_writeq(cpu_to_le64(q), addr); } +#define readb readb +#define readw readw +#define readl readl +#define readq readq +#define writeb writeb +#define writew writew +#define writel writel +#define writeq writeq + #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) #define readl_relaxed(addr) readl(addr) -- cgit v1.2.3