Commit 16741ea0 authored by Thomas Gleixner's avatar Thomas Gleixner

sparc: Cleanup direct irq_desc access

Use the proper wrapper functions.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: sparclinux@vger.kernel.org
parent fcd8d4f4
...@@ -627,7 +627,6 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) ...@@ -627,7 +627,6 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
struct irq_handler_data *handler_data; struct irq_handler_data *handler_data;
unsigned long hv_err, cookie; unsigned long hv_err, cookie;
struct ino_bucket *bucket; struct ino_bucket *bucket;
struct irq_desc *desc;
unsigned int irq; unsigned int irq;
bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC);
...@@ -660,9 +659,7 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) ...@@ -660,9 +659,7 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
* especially wrt. locking, we do not let request_irq() enable * especially wrt. locking, we do not let request_irq() enable
* the interrupt. * the interrupt.
*/ */
desc = irq_desc + irq; irq_set_status_flags(irq, IRQ_NOAUTOEN);
desc->status |= IRQ_NOAUTOEN;
set_irq_data(irq, handler_data); set_irq_data(irq, handler_data);
/* Catch accidental accesses to these things. IMAP/ICLR handling /* Catch accidental accesses to these things. IMAP/ICLR handling
...@@ -772,19 +769,18 @@ void fixup_irqs(void) ...@@ -772,19 +769,18 @@ void fixup_irqs(void)
unsigned int irq; unsigned int irq;
for (irq = 0; irq < NR_IRQS; irq++) { for (irq = 0; irq < NR_IRQS; irq++) {
struct irq_desc *desc = irq_to_desc(irq);
struct irq_data *data = irq_desc_get_irq_data(desc);
unsigned long flags; unsigned long flags;
raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
if (irq_desc[irq].action && if (desc->action && !irqd_is_per_cpu(data)) {
!(irq_desc[irq].status & IRQ_PER_CPU)) {
struct irq_data *data = irq_get_irq_data(irq);
if (data->chip->irq_set_affinity) if (data->chip->irq_set_affinity)
data->chip->irq_set_affinity(data, data->chip->irq_set_affinity(data,
data->affinity, data->affinity,
false); false);
} }
raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
tick_ops->disable_irq(); tick_ops->disable_irq();
...@@ -1022,5 +1018,5 @@ void __init init_IRQ(void) ...@@ -1022,5 +1018,5 @@ void __init init_IRQ(void)
: "i" (PSTATE_IE) : "i" (PSTATE_IE)
: "g1"); : "g1");
irq_desc[0].action = &timer_irq_action; irq_to_desc(0)->action = &timer_irq_action;
} }
...@@ -30,13 +30,10 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie) ...@@ -30,13 +30,10 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie)
err = ops->dequeue_msi(pbm, msiqid, &head, &msi); err = ops->dequeue_msi(pbm, msiqid, &head, &msi);
if (likely(err > 0)) { if (likely(err > 0)) {
struct irq_desc *desc;
unsigned int irq; unsigned int irq;
irq = pbm->msi_irq_table[msi - pbm->msi_first]; irq = pbm->msi_irq_table[msi - pbm->msi_first];
desc = irq_desc + irq; generic_handle_irq(irq);
desc->handle_irq(irq, desc);
} }
if (unlikely(err < 0)) if (unlikely(err < 0))
......
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