Commit c4bc51b1 authored by Thomas Gleixner's avatar Thomas Gleixner

powerpc/pseries/msi: Use msi_domain_ops:: Msi_post_free()

Use the new msi_post_free() callback which is invoked after the interrupts
have been freed to tell the hypervisor about the shutdown.

This allows to remove the exposure of __msi_domain_free_irqs().
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarAshok Raj <ashok.raj@intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20221111122014.120489922@linutronix.de
parent f6d3486a
...@@ -447,21 +447,18 @@ static void pseries_msi_ops_msi_free(struct irq_domain *domain, ...@@ -447,21 +447,18 @@ static void pseries_msi_ops_msi_free(struct irq_domain *domain,
* RTAS can not disable one MSI at a time. It's all or nothing. Do it * RTAS can not disable one MSI at a time. It's all or nothing. Do it
* at the end after all IRQs have been freed. * at the end after all IRQs have been freed.
*/ */
static void pseries_msi_domain_free_irqs(struct irq_domain *domain, static void pseries_msi_post_free(struct irq_domain *domain, struct device *dev)
struct device *dev)
{ {
if (WARN_ON_ONCE(!dev_is_pci(dev))) if (WARN_ON_ONCE(!dev_is_pci(dev)))
return; return;
__msi_domain_free_irqs(domain, dev);
rtas_disable_msi(to_pci_dev(dev)); rtas_disable_msi(to_pci_dev(dev));
} }
static struct msi_domain_ops pseries_pci_msi_domain_ops = { static struct msi_domain_ops pseries_pci_msi_domain_ops = {
.msi_prepare = pseries_msi_ops_prepare, .msi_prepare = pseries_msi_ops_prepare,
.msi_free = pseries_msi_ops_msi_free, .msi_free = pseries_msi_ops_msi_free,
.domain_free_irqs = pseries_msi_domain_free_irqs, .msi_post_free = pseries_msi_post_free,
}; };
static void pseries_msi_shutdown(struct irq_data *d) static void pseries_msi_shutdown(struct irq_data *d)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment