ARM: Bulk conversion to generic_handle_domain_irq()
authorMarc Zyngier <maz@kernel.org>
Tue, 4 May 2021 16:42:18 +0000 (17:42 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 12 Aug 2021 10:39:39 +0000 (11:39 +0100)
Wherever possible, replace constructs that match either
generic_handle_irq(irq_find_mapping()) or
generic_handle_irq(irq_linear_revmap()) to a single call to
generic_handle_domain_irq().

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm/common/sa1111.c
arch/arm/mach-pxa/pxa_cplds_irqs.c
arch/arm/mach-s3c/irq-s3c24xx.c

index ff5e0d04cb89238933bd20dccb778e6a53c007c1..d17083c3fe2dd5f2c143eb53c94701b572fcb1c6 100644 (file)
@@ -196,14 +196,6 @@ static int sa1111_map_irq(struct sa1111 *sachip, irq_hw_number_t hwirq)
        return irq_create_mapping(sachip->irqdomain, hwirq);
 }
 
-static void sa1111_handle_irqdomain(struct irq_domain *irqdomain, int irq)
-{
-       struct irq_desc *d = irq_to_desc(irq_linear_revmap(irqdomain, irq));
-
-       if (d)
-               generic_handle_irq_desc(d);
-}
-
 /*
  * SA1111 interrupt support.  Since clearing an IRQ while there are
  * active IRQs causes the interrupt output to pulse, the upper levels
@@ -234,11 +226,11 @@ static void sa1111_irq_handler(struct irq_desc *desc)
 
        for (i = 0; stat0; i++, stat0 >>= 1)
                if (stat0 & 1)
-                       sa1111_handle_irqdomain(irqdomain, i);
+                       generic_handle_domain_irq(irqdomain, i);
 
        for (i = 32; stat1; i++, stat1 >>= 1)
                if (stat1 & 1)
-                       sa1111_handle_irqdomain(irqdomain, i);
+                       generic_handle_domain_irq(irqdomain, i);
 
        /* For level-based interrupts */
        desc->irq_data.chip->irq_unmask(&desc->irq_data);
index bddfc7cd5d40f5e921ca8ef0fd6db332ddd632e2..eda5a47d7fbbc676bed8dbfb5df10ee1d53118a5 100644 (file)
@@ -39,10 +39,8 @@ static irqreturn_t cplds_irq_handler(int in_irq, void *d)
 
        do {
                pending = readl(fpga->base + FPGA_IRQ_SET_CLR) & fpga->irq_mask;
-               for_each_set_bit(bit, &pending, CPLDS_NB_IRQ) {
-                       generic_handle_irq(irq_find_mapping(fpga->irqdomain,
-                                                           bit));
-               }
+               for_each_set_bit(bit, &pending, CPLDS_NB_IRQ)
+                       generic_handle_domain_irq(fpga->irqdomain, bit);
        } while (pending);
 
        return IRQ_HANDLED;
index 0c631c14a8172236321c20a70725ac4cfc38da1f..3edc5f614eefc4f704dbdfc5658dd62ee55793d5 100644 (file)
@@ -298,7 +298,7 @@ static void s3c_irq_demux(struct irq_desc *desc)
        struct s3c_irq_data *irq_data = irq_desc_get_chip_data(desc);
        struct s3c_irq_intc *intc = irq_data->intc;
        struct s3c_irq_intc *sub_intc = irq_data->sub_intc;
-       unsigned int n, offset, irq;
+       unsigned int n, offset;
        unsigned long src, msk;
 
        /* we're using individual domains for the non-dt case
@@ -318,8 +318,7 @@ static void s3c_irq_demux(struct irq_desc *desc)
        while (src) {
                n = __ffs(src);
                src &= ~(1 << n);
-               irq = irq_find_mapping(sub_intc->domain, offset + n);
-               generic_handle_irq(irq);
+               generic_handle_domain_irq(sub_intc->domain, offset + n);
        }
 
        chained_irq_exit(chip, desc);