diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-24 12:57:12 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-29 08:48:14 -0400 |
commit | 16741ea0411ff8adb9b84934433638fa432c5292 (patch) | |
tree | a137882dae34c2b2aea84088fec127ff1442ae6e /arch | |
parent | fcd8d4f498698265fc0fba1dd376303caea71de4 (diff) |
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')
-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 3c8b2666c325..0914438418a2 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) | |||
627 | struct irq_handler_data *handler_data; | 627 | struct irq_handler_data *handler_data; |
628 | unsigned long hv_err, cookie; | 628 | unsigned long hv_err, cookie; |
629 | struct ino_bucket *bucket; | 629 | struct ino_bucket *bucket; |
630 | struct irq_desc *desc; | ||
631 | unsigned int irq; | 630 | unsigned int irq; |
632 | 631 | ||
633 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); | 632 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); |
@@ -660,9 +659,7 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | |||
660 | * especially wrt. locking, we do not let request_irq() enable | 659 | * especially wrt. locking, we do not let request_irq() enable |
661 | * the interrupt. | 660 | * the interrupt. |
662 | */ | 661 | */ |
663 | desc = irq_desc + irq; | 662 | irq_set_status_flags(irq, IRQ_NOAUTOEN); |
664 | desc->status |= IRQ_NOAUTOEN; | ||
665 | |||
666 | set_irq_data(irq, handler_data); | 663 | set_irq_data(irq, handler_data); |
667 | 664 | ||
668 | /* Catch accidental accesses to these things. IMAP/ICLR handling | 665 | /* Catch accidental accesses to these things. IMAP/ICLR handling |
@@ -772,19 +769,18 @@ void fixup_irqs(void) | |||
772 | unsigned int irq; | 769 | unsigned int irq; |
773 | 770 | ||
774 | for (irq = 0; irq < NR_IRQS; irq++) { | 771 | for (irq = 0; irq < NR_IRQS; irq++) { |
772 | struct irq_desc *desc = irq_to_desc(irq); | ||
773 | struct irq_data *data = irq_desc_get_irq_data(desc); | ||
775 | unsigned long flags; | 774 | unsigned long flags; |
776 | 775 | ||
777 | raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); | 776 | raw_spin_lock_irqsave(&desc->lock, flags); |
778 | if (irq_desc[irq].action && | 777 | if (desc->action && !irqd_is_per_cpu(data)) { |
779 | !(irq_desc[irq].status & IRQ_PER_CPU)) { | ||
780 | struct irq_data *data = irq_get_irq_data(irq); | ||
781 | |||
782 | if (data->chip->irq_set_affinity) | 778 | if (data->chip->irq_set_affinity) |
783 | data->chip->irq_set_affinity(data, | 779 | data->chip->irq_set_affinity(data, |
784 | data->affinity, | 780 | data->affinity, |
785 | false); | 781 | false); |
786 | } | 782 | } |
787 | raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 783 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
788 | } | 784 | } |
789 | 785 | ||
790 | tick_ops->disable_irq(); | 786 | tick_ops->disable_irq(); |
@@ -1022,5 +1018,5 @@ void __init init_IRQ(void) | |||
1022 | : "i" (PSTATE_IE) | 1018 | : "i" (PSTATE_IE) |
1023 | : "g1"); | 1019 | : "g1"); |
1024 | 1020 | ||
1025 | irq_desc[0].action = &timer_irq_action; | 1021 | irq_to_desc(0)->action = &timer_irq_action; |
1026 | } | 1022 | } |
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index 550e937720e7..da4f4f4ebc33 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) | |||
30 | 30 | ||
31 | err = ops->dequeue_msi(pbm, msiqid, &head, &msi); | 31 | err = ops->dequeue_msi(pbm, msiqid, &head, &msi); |
32 | if (likely(err > 0)) { | 32 | if (likely(err > 0)) { |
33 | struct irq_desc *desc; | ||
34 | unsigned int irq; | 33 | unsigned int irq; |
35 | 34 | ||
36 | irq = pbm->msi_irq_table[msi - pbm->msi_first]; | 35 | irq = pbm->msi_irq_table[msi - pbm->msi_first]; |
37 | desc = irq_desc + irq; | 36 | generic_handle_irq(irq); |
38 | |||
39 | desc->handle_irq(irq, desc); | ||
40 | } | 37 | } |
41 | 38 | ||
42 | if (unlikely(err < 0)) | 39 | if (unlikely(err < 0)) |