Re: [RFC PATCH] genirq: Provide generic_handle_domain_irq_safe().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 09, 2022 at 04:04:08PM +0200, Sebastian Andrzej Siewior wrote:
> The problem with generic_handle_domain_irq() is that with `threadirqs'
> it will trigger "WARN_ON_ONCE(!in_hardirq())".

Now silenced by:
https://git.kernel.org/linus/792ea6a074ae


> +int generic_handle_domain_irq_safe(struct irq_domain *domain, unsigned int hwirq)
> +{
> +	unsigned long flags;
> +	int ret;
> +
> +	local_irq_save(flags);
> +	ret = handle_irq_desc(irq_resolve_mapping(domain, hwirq));
> +	local_irq_restore(flags);
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(generic_handle_domain_irq_safe);

AFAICS you don't need to disable hardirqs at least for the "threadirqs"
case because irq_forced_thread_fn() already does that.


>  drivers/bcma/driver_gpio.c                 |  2 +-
>  drivers/gpio/gpio-mlxbf2.c                 |  6 ++----
>  drivers/pinctrl/pinctrl-amd.c              |  2 +-
>  drivers/platform/x86/intel/int0002_vgpio.c |  3 +--
>  drivers/ssb/driver_gpio.c                  |  6 ++++--

>From a quick look, the proper solution for all of those drivers is
probably to just add IRQF_NO_THREAD and be done with it.

Thanks,

Lukas



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux