diff options
| author | Marc Zyngier <maz@kernel.org> | 2025-05-13 17:31:40 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2025-05-14 12:36:41 +0200 |
| commit | 28026cf2dd84d961a62123b1fa941dc3c2c4a132 (patch) | |
| tree | fb821a6f737b3807236fe7ba44a8710b2e9c0a49 /kernel/irq | |
| parent | a1d8a8309367565dc658ae31dcc256beb9f0423b (diff) | |
| download | linux-28026cf2dd84d961a62123b1fa941dc3c2c4a132.tar.gz linux-28026cf2dd84d961a62123b1fa941dc3c2c4a132.tar.bz2 linux-28026cf2dd84d961a62123b1fa941dc3c2c4a132.zip | |
genirq/msi: Add .msi_teardown() callback as the reverse of .msi_prepare()
While the MSI ops do have a .msi_prepare() callback that is responsible for
setting up the relevant (usually per-device) allocation, there is no
callback reversing this setup.
For this purpose, add .msi_teardown() callback.
In order to avoid breaking the ITS driver that suffers from related issues,
do not call the callback just yet.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250513163144.2215824-2-maz@kernel.org
Diffstat (limited to 'kernel/irq')
| -rw-r--r-- | kernel/irq/msi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index a8f7701c2929..7f0dfe0e5ccb 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -795,6 +795,11 @@ 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_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc) { @@ -820,6 +825,7 @@ static struct msi_domain_ops msi_domain_ops_default = { .get_hwirq = msi_domain_ops_get_hwirq, .msi_init = msi_domain_ops_init, .msi_prepare = msi_domain_ops_prepare, + .msi_teardown = msi_domain_ops_teardown, .set_desc = msi_domain_ops_set_desc, }; @@ -841,6 +847,8 @@ static void msi_domain_update_dom_ops(struct msi_domain_info *info) ops->msi_init = msi_domain_ops_default.msi_init; if (ops->msi_prepare == NULL) ops->msi_prepare = msi_domain_ops_default.msi_prepare; + if (ops->msi_teardown == NULL) + ops->msi_teardown = msi_domain_ops_default.msi_teardown; if (ops->set_desc == NULL) ops->set_desc = msi_domain_ops_default.set_desc; } |
