diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-24 17:57:12 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-29 14:48:14 +0200 |
commit | 16741ea0411ff8adb9b84934433638fa432c5292 (patch) | |
tree | a137882dae34c2b2aea84088fec127ff1442ae6e /arch/sparc | |
parent | fcd8d4f498698265fc0fba1dd376303caea71de4 (diff) | |
download | linux-3.10-16741ea0411ff8adb9b84934433638fa432c5292.tar.gz linux-3.10-16741ea0411ff8adb9b84934433638fa432c5292.tar.bz2 linux-3.10-16741ea0411ff8adb9b84934433638fa432c5292.zip |
sparc: Cleanup direct irq_desc access
Use the proper wrapper functions.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: sparclinux@vger.kernel.org
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 22 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 5 |
2 files changed, 10 insertions, 17 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 3c8b2666c32..0914438418a 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -627,7 +627,6 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) struct irq_handler_data *handler_data; unsigned long hv_err, cookie; struct ino_bucket *bucket; - struct irq_desc *desc; unsigned int irq; bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); @@ -660,9 +659,7 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) * especially wrt. locking, we do not let request_irq() enable * the interrupt. */ - desc = irq_desc + irq; - desc->status |= IRQ_NOAUTOEN; - + irq_set_status_flags(irq, IRQ_NOAUTOEN); set_irq_data(irq, handler_data); /* Catch accidental accesses to these things. IMAP/ICLR handling @@ -772,19 +769,18 @@ void fixup_irqs(void) unsigned int 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; - raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); - if (irq_desc[irq].action && - !(irq_desc[irq].status & IRQ_PER_CPU)) { - struct irq_data *data = irq_get_irq_data(irq); - + raw_spin_lock_irqsave(&desc->lock, flags); + if (desc->action && !irqd_is_per_cpu(data)) { if (data->chip->irq_set_affinity) data->chip->irq_set_affinity(data, - data->affinity, - false); + data->affinity, + false); } - raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); + raw_spin_unlock_irqrestore(&desc->lock, flags); } tick_ops->disable_irq(); @@ -1022,5 +1018,5 @@ void __init init_IRQ(void) : "i" (PSTATE_IE) : "g1"); - irq_desc[0].action = &timer_irq_action; + irq_to_desc(0)->action = &timer_irq_action; } diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index 550e937720e..da4f4f4ebc3 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c @@ -30,13 +30,10 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie) err = ops->dequeue_msi(pbm, msiqid, &head, &msi); if (likely(err > 0)) { - struct irq_desc *desc; unsigned int irq; irq = pbm->msi_irq_table[msi - pbm->msi_first]; - desc = irq_desc + irq; - - desc->handle_irq(irq, desc); + generic_handle_irq(irq); } if (unlikely(err < 0)) |