]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc: Switch to irq_find_mapping()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 19 Mar 2025 09:29:34 +0000 (10:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 May 2025 19:06:12 +0000 (21:06 +0200)
irq_linear_revmap() is deprecated, so remove all its uses and supersede
them by an identical call to irq_find_mapping().

[ tglx: Fix up subject prefix ]

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu> # for 8xx
Link: https://lore.kernel.org/all/20250319092951.37667-42-jirislaby@kernel.org
14 files changed:
arch/powerpc/platforms/44x/uic.c
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
arch/powerpc/platforms/52xx/mpc52xx_pic.c
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
arch/powerpc/platforms/8xx/cpm1-ic.c
arch/powerpc/platforms/8xx/pic.c
arch/powerpc/platforms/embedded6xx/flipper-pic.c
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/sysdev/cpm2_pic.c
arch/powerpc/sysdev/ehv_pic.c
arch/powerpc/sysdev/ge/ge_pic.c
arch/powerpc/sysdev/ipic.c
arch/powerpc/sysdev/mpic.c

index 481ec25ce78fff976561b6f7e34c4149247d326e..85daf841fd3ff15513f94d5e2bb02711c07ae42a 100644 (file)
@@ -328,5 +328,5 @@ unsigned int uic_get_irq(void)
        msr = mfdcr(primary_uic->dcrbase + UIC_MSR);
        src = 32 - ffs(msr);
 
-       return irq_linear_revmap(primary_uic->irqhost, src);
+       return irq_find_mapping(primary_uic->irqhost, src);
 }
index f042b21b2b732cc15840443ab273757fdebb3e94..3dbe5a5e5d1f58d4ed8084e55b5b795b7a0255db 100644 (file)
@@ -369,7 +369,7 @@ struct mpc52xx_gpt_priv *mpc52xx_gpt_from_irq(int irq)
        mutex_lock(&mpc52xx_gpt_list_mutex);
        list_for_each(pos, &mpc52xx_gpt_list) {
                gpt = container_of(pos, struct mpc52xx_gpt_priv, list);
-               if (gpt->irqhost && irq == irq_linear_revmap(gpt->irqhost, 0)) {
+               if (gpt->irqhost && irq == irq_find_mapping(gpt->irqhost, 0)) {
                        mutex_unlock(&mpc52xx_gpt_list_mutex);
                        return gpt;
                }
index 7ec56d3788a9006c8a3a1967f12f648e44945b1c..eb6a4e745c08c0bf14ceffdc9d74c8f00861674c 100644 (file)
@@ -515,5 +515,5 @@ unsigned int mpc52xx_get_irq(void)
                return 0;
        }
 
-       return irq_linear_revmap(mpc52xx_irqhost, irq);
+       return irq_find_mapping(mpc52xx_irqhost, irq);
 }
index b4f6360830b1b6ac280e5522e21820ca2488da71..4b69fb321a68d5172051dbd499752c608d878a1f 100644 (file)
@@ -83,7 +83,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq)
                if (cause >> (i + 16))
                        break;
        }
-       return irq_linear_revmap(socrates_fpga_pic_irq_host,
+       return irq_find_mapping(socrates_fpga_pic_irq_host,
                        (irq_hw_number_t)i);
 }
 
index 1549f6cd29f48b5f92f6c6f76762898b3914533d..a49d4a9ab3bc0f15b72d0f26847ea4fd361bca1c 100644 (file)
@@ -59,7 +59,7 @@ static int cpm_get_irq(struct irq_desc *desc)
        cpm_vec = in_be16(&data->reg->cpic_civr);
        cpm_vec >>= 11;
 
-       return irq_linear_revmap(data->host, cpm_vec);
+       return irq_find_mapping(data->host, cpm_vec);
 }
 
 static void cpm_cascade(struct irq_desc *desc)
index 7639f28172becf0beafcaca606a4fba04cc0a6df..933d6ab7f512ebceb6b062ea8fea77d5857807a0 100644 (file)
@@ -80,7 +80,7 @@ unsigned int mpc8xx_get_irq(void)
        if (irq == PIC_VEC_SPURRIOUS)
                return 0;
 
-        return irq_linear_revmap(mpc8xx_pic_host, irq);
+        return irq_find_mapping(mpc8xx_pic_host, irq);
 
 }
 
index a41649bf0cb8379192ddbc4b45c66f5d6c5dd6fd..91a8f0a7086eac337b8215e62ff927965574b849 100644 (file)
@@ -173,7 +173,7 @@ unsigned int flipper_pic_get_irq(void)
                return 0;       /* no more IRQs pending */
 
        irq = __ffs(irq_status);
-       return irq_linear_revmap(flipper_irq_host, irq);
+       return irq_find_mapping(flipper_irq_host, irq);
 }
 
 /*
index 9abb3da36ba5a52ab9f6756ece3a3460f8a2e39c..b57e87b0b3ceafd1d4dc9522310c8de79b0cedd5 100644 (file)
@@ -190,7 +190,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)
 unsigned int hlwd_pic_get_irq(void)
 {
        unsigned int hwirq = __hlwd_pic_get_irq(hlwd_irq_host);
-       return hwirq ? irq_linear_revmap(hlwd_irq_host, hwirq) : 0;
+       return hwirq ? irq_find_mapping(hlwd_irq_host, hwirq) : 0;
 }
 
 /*
index 2eddc8bff7abbe664dcc707a2c968b6bbffc063e..c37783a03d254ea3836dd8973e2347e0077d0a6f 100644 (file)
@@ -250,7 +250,7 @@ static unsigned int pmac_pic_get_irq(void)
        raw_spin_unlock_irqrestore(&pmac_pic_lock, flags);
        if (unlikely(irq < 0))
                return 0;
-       return irq_linear_revmap(pmac_pic_host, irq);
+       return irq_find_mapping(pmac_pic_host, irq);
 }
 
 static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node,
index c63d72f17a3e26e9990ab012e5ea82c64bf4de2b..4a59ed1d62ceae234db0ecc3f9fe3f0b968273c8 100644 (file)
@@ -207,7 +207,7 @@ unsigned int cpm2_get_irq(void)
 
        if (irq == 0)
                return(-1);
-       return irq_linear_revmap(cpm2_pic_host, irq);
+       return irq_find_mapping(cpm2_pic_host, irq);
 }
 
 static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq,
index 4ee8d36ca647925781a4ebd863a23e5abf270a8c..b6f9774038e1a8d7cd96730b95b2d2dcc5e9d554 100644 (file)
@@ -175,7 +175,7 @@ unsigned int ehv_pic_get_irq(void)
         * this will also setup revmap[] in the slow path for the first
         * time, next calls will always use fast path by indexing revmap
         */
-       return irq_linear_revmap(global_ehv_pic->irqhost, irq);
+       return irq_find_mapping(global_ehv_pic->irqhost, irq);
 }
 
 static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node,
index 5b1f8dc3c9602ec7b085860b61fbc0fbc84dad48..0bc3f0b365288eeeb9178d43ff2031b20b2998a0 100644 (file)
@@ -245,7 +245,7 @@ unsigned int gef_pic_get_irq(void)
                        if (active & (0x1 << hwirq))
                                break;
                }
-               virq = irq_linear_revmap(gef_pic_irq_host,
+               virq = irq_find_mapping(gef_pic_irq_host,
                        (irq_hw_number_t)hwirq);
        }
 
index f7b415ebb71c7854965beb37a3a7d383c5c8197f..70be2105865db5f91bf23c92676f0fb557fb56d5 100644 (file)
@@ -801,7 +801,7 @@ unsigned int ipic_get_irq(void)
        if (irq == 0)    /* 0 --> no irq is pending */
                return 0;
 
-       return irq_linear_revmap(primary_ipic->irqhost, irq);
+       return irq_find_mapping(primary_ipic->irqhost, irq);
 }
 
 #ifdef CONFIG_SUSPEND
index 3de090159a1b6b792cf064ebb08598e51f113b2f..787a88efdb3582b01949ca2caef0379f44865f30 100644 (file)
@@ -1785,7 +1785,7 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
                return 0;
        }
 
-       return irq_linear_revmap(mpic->irqhost, src);
+       return irq_find_mapping(mpic->irqhost, src);
 }
 
 unsigned int mpic_get_one_irq(struct mpic *mpic)
@@ -1823,7 +1823,7 @@ unsigned int mpic_get_coreint_irq(void)
                return 0;
        }
 
-       return irq_linear_revmap(mpic->irqhost, src);
+       return irq_find_mapping(mpic->irqhost, src);
 #else
        return 0;
 #endif