android_kernel_motorola_sm6375/kernel/irq
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Barry Song f5ce428e3e genirq: Add IRQF_NO_AUTOEN for request_irq/nmi()
[ Upstream commit cbe16f35bee6880becca6f20d2ebf6b457148552 ]

Many drivers don't want interrupts enabled automatically via request_irq().
So they are handling this issue by either way of the below two:

(1)
  irq_set_status_flags(irq, IRQ_NOAUTOEN);
  request_irq(dev, irq...);

(2)
  request_irq(dev, irq...);
  disable_irq(irq);

The code in the second way is silly and unsafe. In the small time gap
between request_irq() and disable_irq(), interrupts can still come.

The code in the first way is safe though it's subobtimal.

Add a new IRQF_NO_AUTOEN flag which can be handed in by drivers to
request_irq() and request_nmi(). It prevents the automatic enabling of the
requested interrupt/nmi in the same safe way as #1 above. With that the
various usage sites of #1 and #2 above can be simplified and corrected.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: dmitry.torokhov@gmail.com
Link: https://lore.kernel.org/r/20210302224916.13980-2-song.bao.hua@hisilicon.com
Stable-dep-of: 39db65a0a17b ("ASoC: es8316: Handle optional IRQ assignment")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:35:46 +02:00
..
affinity.c genirq/affinity: Consider that CPUs on nodes can be unbalanced 2022-04-20 09:19:39 +02:00
autoprobe.c
chip.c genirq: Don't return error on missing optional irq_request_resources() 2022-08-25 11:17:29 +02:00
cpuhotplug.c
debug.h
debugfs.c
devres.c
dummychip.c
generic-chip.c
handle.c random: remove unused irq_flags argument from add_interrupt_randomness() 2022-06-22 14:11:06 +02:00
internals.h genirq/irqdesc: Don't try to remove non-existing sysfs files 2023-01-18 11:40:55 +01:00
ipi.c
irq_sim.c
irqdesc.c genirq/irqdesc: Don't try to remove non-existing sysfs files 2023-01-18 11:40:55 +01:00
irqdomain.c irqdomain: Fix mapping-creation race 2023-04-20 12:07:35 +02:00
Kconfig genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY 2020-11-18 19:20:16 +01:00
Makefile
manage.c genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() 2023-05-17 11:35:46 +02:00
matrix.c genirq/matrix: Prevent allocation counter corruption 2021-05-11 14:04:05 +02:00
migration.c
msi.c genirq/msi: Ensure deactivation on teardown 2021-08-18 08:57:02 +02:00
pm.c genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq() 2020-08-21 13:05:20 +02:00
proc.c
resend.c treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-04-20 12:07:32 +02:00
settings.h
spurious.c
timings.c genirq/timings: Fix error return code in irq_timings_test_irqs() 2021-09-15 09:47:29 +02:00