kernel_samsung_a53x/kernel/irq
Herve Codina ceb77d7c0f 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: cfefd21e693d ("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>
2024-11-18 11:43:25 +01:00
..
affinity.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
autoprobe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpuhotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devres.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dummychip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic-chip.c genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware 2024-11-18 11:43:25 +01:00
handle.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
internals.h kernel: Introduce SBalance IRQ balancer 2024-11-17 17:55:12 +01:00
ipi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq_sim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irqdesc.c kernel: Introduce SBalance IRQ balancer 2024-11-17 17:55:12 +01:00
irqdomain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig kernel: Introduce SBalance IRQ balancer 2024-11-17 17:55:12 +01:00
Makefile kernel: Introduce SBalance IRQ balancer 2024-11-17 17:55:12 +01:00
manage.c kernel: Introduce SBalance IRQ balancer 2024-11-17 17:55:12 +01:00
matrix.c genirq/matrix: Exclude managed interrupts in irq_matrix_allocated() 2024-11-18 11:42:47 +01:00
migration.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c irq: Don't allow IRQ affinities to be set from userspace 2024-11-17 17:45:42 +01:00
resend.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbalance.c kernel: Introduce SBalance IRQ balancer 2024-11-17 17:55:12 +01:00
settings.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spurious.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timings.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00