Commit 25aae561 authored by Jiang Liu's avatar Jiang Liu Committed by Ralf Baechle

MIPS, IRQ: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

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: default avatarJiang Liu <jiang.liu@linux.intel.com>
Acked-by: default avatarSergey 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent 2e93f684
...@@ -76,7 +76,7 @@ static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc) ...@@ -76,7 +76,7 @@ static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc)
unsigned nr, misc_irq = 0; unsigned nr, misc_irq = 0;
if (pending) { if (pending) {
struct irq_domain *domain = irq_get_handler_data(irq); struct irq_domain *domain = irq_desc_get_handler_data(desc);
nr = __ffs(pending); nr = __ffs(pending);
misc_irq = irq_find_mapping(domain, nr); misc_irq = irq_find_mapping(domain, nr);
......
...@@ -80,7 +80,7 @@ static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc) ...@@ -80,7 +80,7 @@ static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc)
unsigned nr, misc_irq = 0; unsigned nr, misc_irq = 0;
if (pending) { if (pending) {
struct irq_domain *domain = irq_get_handler_data(irq); struct irq_domain *domain = irq_desc_get_handler_data(desc);
nr = __ffs(pending); nr = __ffs(pending);
misc_irq = irq_find_mapping(domain, nr); misc_irq = irq_find_mapping(domain, nr);
......
...@@ -698,7 +698,9 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data) ...@@ -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) 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); handle_edge_irq(irq, desc);
else else
handle_level_irq(irq, desc); handle_level_irq(irq, desc);
......
...@@ -320,7 +320,7 @@ static int ar2315_pci_host_setup(struct ar2315_pci_ctrl *apc) ...@@ -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) 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) & u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) &
ar2315_pci_reg_read(apc, AR2315_PCI_IMR); ar2315_pci_reg_read(apc, AR2315_PCI_IMR);
unsigned pci_irq = 0; unsigned pci_irq = 0;
......
...@@ -232,7 +232,7 @@ static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -232,7 +232,7 @@ static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
void __iomem *base = ath79_reset_base; void __iomem *base = ath79_reset_base;
u32 pending; 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) & pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE); __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
......
...@@ -231,7 +231,7 @@ static void ar724x_pci_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -231,7 +231,7 @@ static void ar724x_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
void __iomem *base; void __iomem *base;
u32 pending; u32 pending;
apc = irq_get_handler_data(irq); apc = irq_desc_get_handler_data(desc);
base = apc->ctrl_base; base = apc->ctrl_base;
pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) & pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &
......
...@@ -134,7 +134,7 @@ static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -134,7 +134,7 @@ static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc)
struct rt3883_pci_controller *rpc; struct rt3883_pci_controller *rpc;
u32 pending; u32 pending;
rpc = irq_get_handler_data(irq); rpc = irq_desc_get_handler_data(desc);
pending = rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIINT) & pending = rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIINT) &
rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIENA); rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIENA);
......
...@@ -100,7 +100,7 @@ static void ralink_intc_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -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); u32 pending = rt_intc_r32(INTC_REG_STATUS0);
if (pending) { 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))); generic_handle_irq(irq_find_mapping(domain, __ffs(pending)));
} else { } else {
spurious_interrupt(); spurious_interrupt();
......
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