Commit 40ca4c2d authored by David Mosberger's avatar David Mosberger

ia64: Rename irq_desc() to irq_descp() to avoid conflict with variable

	of same name declared in linux/irq.h.  The expectation is that
	this variable will be removed eventually and then irq_descp()
	can be renamed to irq_desc() again.  But for now, this makes it
	easier to compile against Linus' source tree.
parent 698a281b
...@@ -382,7 +382,7 @@ iosapic_startup_edge_irq (unsigned int irq) ...@@ -382,7 +382,7 @@ iosapic_startup_edge_irq (unsigned int irq)
static void static void
iosapic_ack_edge_irq (unsigned int irq) iosapic_ack_edge_irq (unsigned int irq)
{ {
irq_desc_t *idesc = irq_desc(irq); irq_desc_t *idesc = irq_descp(irq);
/* /*
* Once we have recorded IRQ_PENDING already, we can mask the * Once we have recorded IRQ_PENDING already, we can mask the
* interrupt for real. This prevents IRQ storms from unhandled * interrupt for real. This prevents IRQ storms from unhandled
...@@ -478,7 +478,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, ...@@ -478,7 +478,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery,
else else
irq_type = &irq_type_iosapic_level; irq_type = &irq_type_iosapic_level;
idesc = irq_desc(vector); idesc = irq_descp(vector);
if (idesc->handler != irq_type) { if (idesc->handler != irq_type) {
if (idesc->handler != &no_irq_type) if (idesc->handler != &no_irq_type)
printk(KERN_WARNING "%s: changing vector %d from %s to %s\n", printk(KERN_WARNING "%s: changing vector %d from %s to %s\n",
...@@ -724,7 +724,7 @@ iosapic_parse_prt (void) ...@@ -724,7 +724,7 @@ iosapic_parse_prt (void)
* If vector was previously initialized to a different * If vector was previously initialized to a different
* handler, re-initialize. * handler, re-initialize.
*/ */
idesc = irq_desc(vector); idesc = irq_descp(vector);
if (idesc->handler != irq_type) if (idesc->handler != irq_type)
register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW, register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
IOSAPIC_LEVEL); IOSAPIC_LEVEL);
......
...@@ -74,7 +74,7 @@ irq_desc_t _irq_desc[NR_IRQS] __cacheline_aligned = { ...@@ -74,7 +74,7 @@ irq_desc_t _irq_desc[NR_IRQS] __cacheline_aligned = {
}; };
#ifdef CONFIG_IA64_GENERIC #ifdef CONFIG_IA64_GENERIC
struct irq_desc * __ia64_irq_desc (unsigned int irq) irq_desc_t * __ia64_irq_desc (unsigned int irq)
{ {
return _irq_desc + irq; return _irq_desc + irq;
} }
...@@ -171,7 +171,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -171,7 +171,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
for (i = 0 ; i < NR_IRQS ; i++) { for (i = 0 ; i < NR_IRQS ; i++) {
idesc = irq_desc(i); idesc = irq_descp(i);
spin_lock_irqsave(&idesc->lock, flags); spin_lock_irqsave(&idesc->lock, flags);
action = idesc->action; action = idesc->action;
if (!action) if (!action)
...@@ -218,7 +218,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -218,7 +218,7 @@ int show_interrupts(struct seq_file *p, void *v)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
inline void synchronize_irq(unsigned int irq) inline void synchronize_irq(unsigned int irq)
{ {
while (irq_desc(irq)->status & IRQ_INPROGRESS) while (irq_descp(irq)->status & IRQ_INPROGRESS)
cpu_relax(); cpu_relax();
} }
#endif #endif
...@@ -352,7 +352,7 @@ static void note_interrupt(int irq, irq_desc_t *desc, irqreturn_t action_ret) ...@@ -352,7 +352,7 @@ static void note_interrupt(int irq, irq_desc_t *desc, irqreturn_t action_ret)
inline void disable_irq_nosync(unsigned int irq) inline void disable_irq_nosync(unsigned int irq)
{ {
irq_desc_t *desc = irq_desc(irq); irq_desc_t *desc = irq_descp(irq);
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); spin_lock_irqsave(&desc->lock, flags);
...@@ -395,7 +395,7 @@ void disable_irq(unsigned int irq) ...@@ -395,7 +395,7 @@ void disable_irq(unsigned int irq)
void enable_irq(unsigned int irq) void enable_irq(unsigned int irq)
{ {
irq_desc_t *desc = irq_desc(irq); irq_desc_t *desc = irq_descp(irq);
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); spin_lock_irqsave(&desc->lock, flags);
...@@ -437,7 +437,7 @@ unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs) ...@@ -437,7 +437,7 @@ unsigned int do_IRQ(unsigned long irq, struct pt_regs *regs)
* 0 return value means that this irq is already being * 0 return value means that this irq is already being
* handled by some other CPU. (or is disabled) * handled by some other CPU. (or is disabled)
*/ */
irq_desc_t *desc = irq_desc(irq); irq_desc_t *desc = irq_descp(irq);
struct irqaction * action; struct irqaction * action;
irqreturn_t action_ret; irqreturn_t action_ret;
unsigned int status; unsigned int status;
...@@ -620,7 +620,7 @@ void free_irq(unsigned int irq, void *dev_id) ...@@ -620,7 +620,7 @@ void free_irq(unsigned int irq, void *dev_id)
if (irq >= NR_IRQS) if (irq >= NR_IRQS)
return; return;
desc = irq_desc(irq); desc = irq_descp(irq);
spin_lock_irqsave(&desc->lock,flags); spin_lock_irqsave(&desc->lock,flags);
p = &desc->action; p = &desc->action;
for (;;) { for (;;) {
...@@ -682,7 +682,7 @@ unsigned long probe_irq_on(void) ...@@ -682,7 +682,7 @@ unsigned long probe_irq_on(void)
* flush such a longstanding irq before considering it as spurious. * flush such a longstanding irq before considering it as spurious.
*/ */
for (i = NR_IRQS-1; i > 0; i--) { for (i = NR_IRQS-1; i > 0; i--) {
desc = irq_desc(i); desc = irq_descp(i);
spin_lock_irq(&desc->lock); spin_lock_irq(&desc->lock);
if (!desc->action) if (!desc->action)
...@@ -700,7 +700,7 @@ unsigned long probe_irq_on(void) ...@@ -700,7 +700,7 @@ unsigned long probe_irq_on(void)
* happened in the previous stage, it may have masked itself) * happened in the previous stage, it may have masked itself)
*/ */
for (i = NR_IRQS-1; i > 0; i--) { for (i = NR_IRQS-1; i > 0; i--) {
desc = irq_desc(i); desc = irq_descp(i);
spin_lock_irq(&desc->lock); spin_lock_irq(&desc->lock);
if (!desc->action) { if (!desc->action) {
...@@ -722,7 +722,7 @@ unsigned long probe_irq_on(void) ...@@ -722,7 +722,7 @@ unsigned long probe_irq_on(void)
*/ */
val = 0; val = 0;
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < NR_IRQS; i++) {
irq_desc_t *desc = irq_desc(i); irq_desc_t *desc = irq_descp(i);
unsigned int status; unsigned int status;
spin_lock_irq(&desc->lock); spin_lock_irq(&desc->lock);
...@@ -762,7 +762,7 @@ unsigned int probe_irq_mask(unsigned long val) ...@@ -762,7 +762,7 @@ unsigned int probe_irq_mask(unsigned long val)
mask = 0; mask = 0;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
irq_desc_t *desc = irq_desc(i); irq_desc_t *desc = irq_descp(i);
unsigned int status; unsigned int status;
spin_lock_irq(&desc->lock); spin_lock_irq(&desc->lock);
...@@ -807,7 +807,7 @@ int probe_irq_off(unsigned long val) ...@@ -807,7 +807,7 @@ int probe_irq_off(unsigned long val)
nr_irqs = 0; nr_irqs = 0;
irq_found = 0; irq_found = 0;
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < NR_IRQS; i++) {
irq_desc_t *desc = irq_desc(i); irq_desc_t *desc = irq_descp(i);
unsigned int status; unsigned int status;
spin_lock_irq(&desc->lock); spin_lock_irq(&desc->lock);
...@@ -836,7 +836,7 @@ int setup_irq(unsigned int irq, struct irqaction * new) ...@@ -836,7 +836,7 @@ int setup_irq(unsigned int irq, struct irqaction * new)
int shared = 0; int shared = 0;
unsigned long flags; unsigned long flags;
struct irqaction *old, **p; struct irqaction *old, **p;
irq_desc_t *desc = irq_desc(irq); irq_desc_t *desc = irq_descp(irq);
if (desc->handler == &no_irq_type) if (desc->handler == &no_irq_type)
return -ENOSYS; return -ENOSYS;
...@@ -963,15 +963,16 @@ static int irq_affinity_read_proc (char *page, char **start, off_t off, ...@@ -963,15 +963,16 @@ static int irq_affinity_read_proc (char *page, char **start, off_t off,
} }
static int irq_affinity_write_proc (struct file *file, const char *buffer, static int irq_affinity_write_proc (struct file *file, const char *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
unsigned int irq = (unsigned long) data; unsigned int irq = (unsigned long) data;
int full_count = count, err; int full_count = count, err;
unsigned long new_value; unsigned long new_value;
const char *buf = buffer; const char *buf = buffer;
irq_desc_t *desc = irq_descp(irq);
int redir; int redir;
if (!irq_desc(irq)->handler->set_affinity) if (!desc->handler->set_affinity)
return -EIO; return -EIO;
if (buf[0] == 'r' || buf[0] == 'R') { if (buf[0] == 'r' || buf[0] == 'R') {
...@@ -993,8 +994,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer, ...@@ -993,8 +994,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
if (!(new_value & cpu_online_map)) if (!(new_value & cpu_online_map))
return -EINVAL; return -EINVAL;
irq_desc(irq)->handler->set_affinity(irq | (redir? IA64_IRQ_REDIRECTED : 0), new_value); desc->handler->set_affinity(irq | (redir? IA64_IRQ_REDIRECTED : 0), new_value);
return full_count; return full_count;
} }
...@@ -1030,7 +1030,7 @@ static void register_irq_proc (unsigned int irq) ...@@ -1030,7 +1030,7 @@ static void register_irq_proc (unsigned int irq)
{ {
char name [MAX_NAMELEN]; char name [MAX_NAMELEN];
if (!root_irq_dir || (irq_desc(irq)->handler == &no_irq_type) || irq_dir[irq]) if (!root_irq_dir || (irq_descp(irq)->handler == &no_irq_type) || irq_dir[irq])
return; return;
memset(name, 0, MAX_NAMELEN); memset(name, 0, MAX_NAMELEN);
...@@ -1083,7 +1083,7 @@ void init_irq_proc (void) ...@@ -1083,7 +1083,7 @@ void init_irq_proc (void)
* Create entries for all existing IRQs. * Create entries for all existing IRQs.
*/ */
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < NR_IRQS; i++) {
if (irq_desc(i)->handler == &no_irq_type) if (irq_descp(i)->handler == &no_irq_type)
continue; continue;
register_irq_proc(i); register_irq_proc(i);
} }
......
...@@ -162,7 +162,7 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action) ...@@ -162,7 +162,7 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action)
for (irq = 0; irq < NR_IRQS; ++irq) for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == vec) { if (irq_to_vector(irq) == vec) {
desc = irq_desc(irq); desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU; desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_ia64_lsapic; desc->handler = &irq_type_ia64_lsapic;
if (action) if (action)
......
...@@ -734,7 +734,7 @@ ia64_mca_init(void) ...@@ -734,7 +734,7 @@ ia64_mca_init(void)
if (cpev >= 0) { if (cpev >= 0) {
for (irq = 0; irq < NR_IRQS; ++irq) for (irq = 0; irq < NR_IRQS; ++irq)
if (irq_to_vector(irq) == cpev) { if (irq_to_vector(irq) == cpev) {
desc = irq_desc(irq); desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU; desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_iosapic_level; desc->handler = &irq_type_iosapic_level;
setup_irq(irq, &mca_cpe_irqaction); setup_irq(irq, &mca_cpe_irqaction);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _ASM_IA64_HW_IRQ_H #define _ASM_IA64_HW_IRQ_H
/* /*
* Copyright (C) 2001-2002 Hewlett-Packard Co * Copyright (C) 2001-2003 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
*/ */
...@@ -91,10 +91,10 @@ hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) ...@@ -91,10 +91,10 @@ hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector)
* Default implementations for the irq-descriptor API: * Default implementations for the irq-descriptor API:
*/ */
extern struct irq_desc _irq_desc[NR_IRQS]; extern irq_desc_t _irq_desc[NR_IRQS];
#ifndef CONFIG_IA64_GENERIC #ifndef CONFIG_IA64_GENERIC
static inline struct irq_desc * static inline irq_desc_t *
__ia64_irq_desc (unsigned int irq) __ia64_irq_desc (unsigned int irq)
{ {
return _irq_desc + irq; return _irq_desc + irq;
...@@ -124,8 +124,8 @@ __ia64_local_vector_to_irq (ia64_vector vec) ...@@ -124,8 +124,8 @@ __ia64_local_vector_to_irq (ia64_vector vec)
*/ */
/* Return a pointer to the irq descriptor for IRQ. */ /* Return a pointer to the irq descriptor for IRQ. */
static inline struct irq_desc * static inline irq_desc_t *
irq_desc (int irq) irq_descp (int irq)
{ {
return platform_irq_desc(irq); return platform_irq_desc(irq);
} }
......
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