Commit 11a39304 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] ppc __iomem annotations - openpic

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b624b553
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#define OPENPIC_BIG_ENDIAN #define OPENPIC_BIG_ENDIAN
#endif #endif
void* OpenPIC_Addr; void __iomem *OpenPIC_Addr;
static volatile struct OpenPIC *OpenPIC = NULL; static volatile struct OpenPIC __iomem *OpenPIC = NULL;
/* /*
* We define OpenPIC_InitSenses table thusly: * We define OpenPIC_InitSenses table thusly:
...@@ -47,7 +47,7 @@ extern int use_of_interrupt_tree; ...@@ -47,7 +47,7 @@ extern int use_of_interrupt_tree;
static u_int NumProcessors; static u_int NumProcessors;
static u_int NumSources; static u_int NumSources;
static int open_pic_irq_offset; static int open_pic_irq_offset;
static volatile OpenPIC_Source *ISR[NR_IRQS]; static volatile OpenPIC_Source __iomem *ISR[NR_IRQS];
static int openpic_cascade_irq = -1; static int openpic_cascade_irq = -1;
static int (*openpic_cascade_fn)(struct pt_regs *); static int (*openpic_cascade_fn)(struct pt_regs *);
...@@ -163,7 +163,7 @@ struct hw_interrupt_type open_pic_ipi = { ...@@ -163,7 +163,7 @@ struct hw_interrupt_type open_pic_ipi = {
#define check_arg_cpu(cpu) do {} while (0) #define check_arg_cpu(cpu) do {} while (0)
#endif #endif
u_int openpic_read(volatile u_int *addr) u_int openpic_read(volatile u_int __iomem *addr)
{ {
u_int val; u_int val;
...@@ -175,7 +175,7 @@ u_int openpic_read(volatile u_int *addr) ...@@ -175,7 +175,7 @@ u_int openpic_read(volatile u_int *addr)
return val; return val;
} }
static inline void openpic_write(volatile u_int *addr, u_int val) static inline void openpic_write(volatile u_int __iomem *addr, u_int val)
{ {
#ifdef OPENPIC_BIG_ENDIAN #ifdef OPENPIC_BIG_ENDIAN
out_be32(addr, val); out_be32(addr, val);
...@@ -184,30 +184,30 @@ static inline void openpic_write(volatile u_int *addr, u_int val) ...@@ -184,30 +184,30 @@ static inline void openpic_write(volatile u_int *addr, u_int val)
#endif #endif
} }
static inline u_int openpic_readfield(volatile u_int *addr, u_int mask) static inline u_int openpic_readfield(volatile u_int __iomem *addr, u_int mask)
{ {
u_int val = openpic_read(addr); u_int val = openpic_read(addr);
return val & mask; return val & mask;
} }
inline void openpic_writefield(volatile u_int *addr, u_int mask, inline void openpic_writefield(volatile u_int __iomem *addr, u_int mask,
u_int field) u_int field)
{ {
u_int val = openpic_read(addr); u_int val = openpic_read(addr);
openpic_write(addr, (val & ~mask) | (field & mask)); openpic_write(addr, (val & ~mask) | (field & mask));
} }
static inline void openpic_clearfield(volatile u_int *addr, u_int mask) static inline void openpic_clearfield(volatile u_int __iomem *addr, u_int mask)
{ {
openpic_writefield(addr, mask, 0); openpic_writefield(addr, mask, 0);
} }
static inline void openpic_setfield(volatile u_int *addr, u_int mask) static inline void openpic_setfield(volatile u_int __iomem *addr, u_int mask)
{ {
openpic_writefield(addr, mask, mask); openpic_writefield(addr, mask, mask);
} }
static void openpic_safe_writefield(volatile u_int *addr, u_int mask, static void openpic_safe_writefield(volatile u_int __iomem *addr, u_int mask,
u_int field) u_int field)
{ {
openpic_setfield(addr, OPENPIC_MASK); openpic_setfield(addr, OPENPIC_MASK);
...@@ -217,7 +217,7 @@ static void openpic_safe_writefield(volatile u_int *addr, u_int mask, ...@@ -217,7 +217,7 @@ static void openpic_safe_writefield(volatile u_int *addr, u_int mask,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* yes this is right ... bug, feature, you decide! -- tgall */ /* yes this is right ... bug, feature, you decide! -- tgall */
u_int openpic_read_IPI(volatile u_int* addr) u_int openpic_read_IPI(volatile u_int __iomem * addr)
{ {
u_int val = 0; u_int val = 0;
#if defined(OPENPIC_BIG_ENDIAN) || defined(CONFIG_POWER3) #if defined(OPENPIC_BIG_ENDIAN) || defined(CONFIG_POWER3)
...@@ -229,23 +229,23 @@ u_int openpic_read_IPI(volatile u_int* addr) ...@@ -229,23 +229,23 @@ u_int openpic_read_IPI(volatile u_int* addr)
} }
/* because of the power3 be / le above, this is needed */ /* because of the power3 be / le above, this is needed */
inline void openpic_writefield_IPI(volatile u_int* addr, u_int mask, u_int field) inline void openpic_writefield_IPI(volatile u_int __iomem * addr, u_int mask, u_int field)
{ {
u_int val = openpic_read_IPI(addr); u_int val = openpic_read_IPI(addr);
openpic_write(addr, (val & ~mask) | (field & mask)); openpic_write(addr, (val & ~mask) | (field & mask));
} }
static inline void openpic_clearfield_IPI(volatile u_int *addr, u_int mask) static inline void openpic_clearfield_IPI(volatile u_int __iomem *addr, u_int mask)
{ {
openpic_writefield_IPI(addr, mask, 0); openpic_writefield_IPI(addr, mask, 0);
} }
static inline void openpic_setfield_IPI(volatile u_int *addr, u_int mask) static inline void openpic_setfield_IPI(volatile u_int __iomem *addr, u_int mask)
{ {
openpic_writefield_IPI(addr, mask, mask); openpic_writefield_IPI(addr, mask, mask);
} }
static void openpic_safe_writefield_IPI(volatile u_int *addr, u_int mask, u_int field) static void openpic_safe_writefield_IPI(volatile u_int __iomem *addr, u_int mask, u_int field)
{ {
openpic_setfield_IPI(addr, OPENPIC_MASK); openpic_setfield_IPI(addr, OPENPIC_MASK);
...@@ -287,16 +287,16 @@ static void openpic_reset(void) ...@@ -287,16 +287,16 @@ static void openpic_reset(void)
} }
#endif #endif
void __init openpic_set_sources(int first_irq, int num_irqs, void *first_ISR) void __init openpic_set_sources(int first_irq, int num_irqs, void __iomem *first_ISR)
{ {
volatile OpenPIC_Source *src = first_ISR; volatile OpenPIC_Source __iomem *src = first_ISR;
int i, last_irq; int i, last_irq;
last_irq = first_irq + num_irqs; last_irq = first_irq + num_irqs;
if (last_irq > NumSources) if (last_irq > NumSources)
NumSources = last_irq; NumSources = last_irq;
if (src == 0) if (src == 0)
src = &((struct OpenPIC *)OpenPIC_Addr)->Source[first_irq]; src = &((struct OpenPIC __iomem *)OpenPIC_Addr)->Source[first_irq];
for (i = first_irq; i < last_irq; ++i, ++src) for (i = first_irq; i < last_irq; ++i, ++src)
ISR[i] = src; ISR[i] = src;
} }
...@@ -318,7 +318,7 @@ void __init openpic_init(int offset) ...@@ -318,7 +318,7 @@ void __init openpic_init(int offset)
printk("No OpenPIC found !\n"); printk("No OpenPIC found !\n");
return; return;
} }
OpenPIC = (volatile struct OpenPIC *)OpenPIC_Addr; OpenPIC = (volatile struct OpenPIC __iomem *)OpenPIC_Addr;
#ifdef CONFIG_EPIC_SERIAL_MODE #ifdef CONFIG_EPIC_SERIAL_MODE
/* Have to start from ground zero. /* Have to start from ground zero.
...@@ -711,7 +711,7 @@ openpic_hookup_cascade(u_int irq, char *name, ...@@ -711,7 +711,7 @@ openpic_hookup_cascade(u_int irq, char *name,
*/ */
static void openpic_enable_irq(u_int irq) static void openpic_enable_irq(u_int irq)
{ {
volatile u_int *vpp; volatile u_int __iomem *vpp;
check_arg_irq(irq); check_arg_irq(irq);
vpp = &ISR[irq - open_pic_irq_offset]->Vector_Priority; vpp = &ISR[irq - open_pic_irq_offset]->Vector_Priority;
...@@ -724,7 +724,7 @@ static void openpic_enable_irq(u_int irq) ...@@ -724,7 +724,7 @@ static void openpic_enable_irq(u_int irq)
static void openpic_disable_irq(u_int irq) static void openpic_disable_irq(u_int irq)
{ {
volatile u_int *vpp; volatile u_int __iomem *vpp;
u32 vp; u32 vp;
check_arg_irq(irq); check_arg_irq(irq);
......
...@@ -172,7 +172,7 @@ struct OpenPIC { ...@@ -172,7 +172,7 @@ struct OpenPIC {
OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS]; OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
}; };
extern volatile struct OpenPIC *OpenPIC; extern volatile struct OpenPIC __iomem *OpenPIC;
/* /*
......
...@@ -35,11 +35,11 @@ extern struct hw_interrupt_type open_pic_ipi; ...@@ -35,11 +35,11 @@ extern struct hw_interrupt_type open_pic_ipi;
extern u_int OpenPIC_NumInitSenses; extern u_int OpenPIC_NumInitSenses;
extern u_char *OpenPIC_InitSenses; extern u_char *OpenPIC_InitSenses;
extern void* OpenPIC_Addr; extern void __iomem * OpenPIC_Addr;
extern int epic_serial_mode; extern int epic_serial_mode;
/* Exported functions */ /* Exported functions */
extern void openpic_set_sources(int first_irq, int num_irqs, void *isr); extern void openpic_set_sources(int first_irq, int num_irqs, void __iomem *isr);
extern void openpic_init(int linux_irq_offset); extern void openpic_init(int linux_irq_offset);
extern void openpic_init_nmi_irq(u_int irq); extern void openpic_init_nmi_irq(u_int irq);
extern void openpic_hookup_cascade(u_int irq, char *name, extern void openpic_hookup_cascade(u_int irq, char *name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment