diff options
author | Marc Zyngier <maz@kernel.org> | 2025-05-13 17:31:41 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2025-05-14 12:36:41 +0200 |
commit | 713335b6ee29f0045737a1ddfc685bc6040d4baf (patch) | |
tree | 60f64e570421c70412254addc580dcda12ff61a7 /kernel | |
parent | 28026cf2dd84d961a62123b1fa941dc3c2c4a132 (diff) |
irqchip/gic-v3-its: Implement .msi_teardown() callback
The ITS driver currently nukes the structure representing an endpoint
device translating via an ITS on freeing the last LPI allocated for it.
That's an unfortunate state of affair, as it is pretty common for a driver
to allocate a single MSI, do something clever, teardown this MSI, and
reallocate a whole bunch of them. The NVME driver does exactly that,
amongst others.
What happens in that case is that the core code is accidentaly issuing
another .msi_prepare() call, even if it shouldn't. This luckily cancels
the above behaviour and hides the problem.
In order to fix the core code, start by implementing the new
.msi_teardown() callback. Nothing calls it yet, so a side effect is that
the its_dev structure will not be freed and that the DID will stay
mapped. Not a big deal, and this will be solved in following patches.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250513163144.2215824-3-maz@kernel.org
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/msi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 7f0dfe0e5ccb2..00f4d8758a2af 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -795,8 +795,7 @@ static int msi_domain_ops_prepare(struct irq_domain *domain, struct device *dev, return 0; } -static void msi_domain_ops_teardown(struct irq_domain *domain, - msi_alloc_info_t *arg) +static void msi_domain_ops_teardown(struct irq_domain *domain, msi_alloc_info_t *arg) { } |