android_kernel_motorola_sm6375/kernel/irq
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Herve Codina a438322e00 genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
commit 5e7afb2eb7b2a7c81e9f608cbdf74a07606fd1b5 upstream.

irq_remove_generic_chip() calculates the Linux interrupt number for removing the
handler and interrupt chip based on gc::irq_base as a linear function of
the bit positions of set bits in the @msk argument.

When the generic chip is present in an irq domain, i.e. created with a call
to irq_alloc_domain_generic_chips(), gc::irq_base contains not the base
Linux interrupt number.  It contains the base hardware interrupt for this
chip. It is set to 0 for the first chip in the domain, 0 + N for the next
chip, where $N is the number of hardware interrupts per chip.

That means the Linux interrupt number cannot be calculated based on
gc::irq_base for irqdomain based chips without a domain map lookup, which
is currently missing.

Rework the code to take the irqdomain case into account and calculate the
Linux interrupt number by a irqdomain lookup of the domain specific
hardware interrupt number.

[ tglx: Massage changelog. Reshuffle the logic and add a proper comment. ]

Fixes: cfefd21e69 ("genirq: Add chip suspend and resume callbacks")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231024150335.322282-1-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 16:50:18 +00: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 genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware 2023-11-28 16:50:18 +00:00
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
Makefile
manage.c genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() 2023-05-17 11:35:46 +02:00
matrix.c genirq/matrix: Exclude managed interrupts in irq_matrix_allocated() 2023-11-20 10:30:08 +01:00
migration.c
msi.c genirq/msi: Ensure deactivation on teardown 2021-08-18 08:57:02 +02:00
pm.c
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