[PATCH v2 06/13] irqchip: kill off set_irq_flags usage
Gregory CLEMENT
gregory.clement at free-electrons.com
Sat Jul 25 06:34:03 PDT 2015
Hi Rob,
On 12/07/2015 16:26, Rob Herring wrote:
> set_irq_flags is ARM specific with custom flags which have genirq
> equivalents. Convert drivers to use the genirq interfaces directly, so we
> can kill off set_irq_flags. The translation of flags is as follows:
>
> IRQF_VALID -> !IRQ_NOREQUEST
> IRQF_PROBE -> !IRQ_NOPROBE
> IRQF_NOAUTOEN -> IRQ_NOAUTOEN
>
> For IRQs managed by an irqdomain, the irqdomain core code handles clearing
> and setting IRQ_NOREQUEST already, so there is no need to do this in
> .map() functions and we can simply remove the set_irq_flags calls. Some
> users also set IRQ_NOPROBE and this has been maintained although it is not
> clear that is really needed. There appears to be a great deal of blind
> copy and paste of this code.
>
> Signed-off-by: Rob Herring <robh at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Jason Cooper <jason at lakedaemon.net>
> Cc: Kukjin Kim <kgene at kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski at samsung.com>
> Cc: Stephen Warren <swarren at wwwdotorg.org>
> Cc: Lee Jones <lee at kernel.org>
> Cc: Alexander Shiyan <shc_work at mail.ru>
> Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: linux-rpi-kernel at lists.infradead.org
> ---
> v2:
> - Fix build error on clps711x
>
[...]
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index 0d3b0fe..b8bf8b0 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -201,7 +201,6 @@ static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq,
> {
> irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip,
> handle_simple_irq);
> - set_irq_flags(virq, IRQF_VALID);
OK
>
> return 0;
> }
> @@ -318,7 +317,7 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
> irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip,
> handle_level_irq);
> }
> - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
> + irq_set_noprobe(virq);
I think it should be irq_set_probe(virq), I don't see why you inverted the probe flag.
Thanks,
Gregory
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the linux-arm-kernel
mailing list