]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS, IRQ: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
authorJiang Liu <jiang.liu@linux.intel.com>
Wed, 20 May 2015 09:59:51 +0000 (17:59 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 21 Jun 2015 19:53:47 +0000 (21:53 +0200)
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Aleksey Makarov <aleksey.makarov@auriga.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-acpi@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10086/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/ath25/ar2315.c
arch/mips/ath25/ar5312.c
arch/mips/cavium-octeon/octeon-irq.c
arch/mips/pci/pci-ar2315.c
arch/mips/pci/pci-ar71xx.c
arch/mips/pci/pci-ar724x.c
arch/mips/pci/pci-rt3883.c
arch/mips/ralink/irq.c

index 2befa7d766a61c25c0549b30c26cf7584ab86b54..8742e1cee4928f9d522ec329bb60f113ad67a89d 100644 (file)
@@ -76,7 +76,7 @@ static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc)
        unsigned nr, misc_irq = 0;
 
        if (pending) {
-               struct irq_domain *domain = irq_get_handler_data(irq);
+               struct irq_domain *domain = irq_desc_get_handler_data(desc);
 
                nr = __ffs(pending);
                misc_irq = irq_find_mapping(domain, nr);
index b6887f75144cd4f0576a81a3ed99a684ae5bc925..094b938fd603d0da938d4e24aae8533f1413159b 100644 (file)
@@ -80,7 +80,7 @@ static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc)
        unsigned nr, misc_irq = 0;
 
        if (pending) {
-               struct irq_domain *domain = irq_get_handler_data(irq);
+               struct irq_domain *domain = irq_desc_get_handler_data(desc);
 
                nr = __ffs(pending);
                misc_irq = irq_find_mapping(domain, nr);
index 10f762557b925d419de87351836f25db4004f04f..d8124a3c5a85308927f2daaaf92781bb2d27fc64 100644 (file)
@@ -698,7 +698,9 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data)
 
 static void octeon_irq_handle_trigger(unsigned int irq, struct irq_desc *desc)
 {
-       if (irq_get_trigger_type(irq) & IRQ_TYPE_EDGE_BOTH)
+       struct irq_data *data = irq_desc_get_irq_data(desc);
+
+       if (irqd_get_trigger_type(data) & IRQ_TYPE_EDGE_BOTH)
                handle_edge_irq(irq, desc);
        else
                handle_level_irq(irq, desc);
index 07a18228e63acf9ec6d86d3ed5abe8fd564c3f02..dadb30306a0a10457782801eaec567544816c7d7 100644 (file)
@@ -320,7 +320,7 @@ static int ar2315_pci_host_setup(struct ar2315_pci_ctrl *apc)
 
 static void ar2315_pci_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-       struct ar2315_pci_ctrl *apc = irq_get_handler_data(irq);
+       struct ar2315_pci_ctrl *apc = irq_desc_get_handler_data(desc);
        u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) &
                      ar2315_pci_reg_read(apc, AR2315_PCI_IMR);
        unsigned pci_irq = 0;
index 9e62ad31d4b545f27c800d65cd61e183f2a7807b..dac6a07c45bf955d9f773d3af79b568983e1ebd8 100644 (file)
@@ -232,7 +232,7 @@ static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
        void __iomem *base = ath79_reset_base;
        u32 pending;
 
-       apc = irq_get_handler_data(irq);
+       apc = irq_desc_get_handler_data(desc);
 
        pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
                  __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
index a1b7d2a1b0d583ec2437536eed917925c34be994..0af362b5af9266537b51a13ed9d2f842ad890992 100644 (file)
@@ -231,7 +231,7 @@ static void ar724x_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
        void __iomem *base;
        u32 pending;
 
-       apc = irq_get_handler_data(irq);
+       apc = irq_desc_get_handler_data(desc);
        base = apc->ctrl_base;
 
        pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &
index ec9be8ca4ada6a409ebf519128513316d7647cd9..80fafe646e7411a9c8e8f8fa1e0cb75cbd7ea7b8 100644 (file)
@@ -134,7 +134,7 @@ static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
        struct rt3883_pci_controller *rpc;
        u32 pending;
 
-       rpc = irq_get_handler_data(irq);
+       rpc = irq_desc_get_handler_data(desc);
 
        pending = rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIINT) &
                  rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIENA);
index 7cf91b92e9d1050bc2ee37341290e7f27f52f9a1..da301e0a2f1f42825898616f1348e3e429228f93 100644 (file)
@@ -100,7 +100,7 @@ static void ralink_intc_irq_handler(unsigned int irq, struct irq_desc *desc)
        u32 pending = rt_intc_r32(INTC_REG_STATUS0);
 
        if (pending) {
-               struct irq_domain *domain = irq_get_handler_data(irq);
+               struct irq_domain *domain = irq_desc_get_handler_data(desc);
                generic_handle_irq(irq_find_mapping(domain, __ffs(pending)));
        } else {
                spurious_interrupt();