]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/pci: Add a msi_free() handler to clear XIVE data
authorCédric Le Goater <clg@kaod.org>
Thu, 1 Jul 2021 13:27:27 +0000 (15:27 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 10 Aug 2021 13:14:58 +0000 (23:14 +1000)
commit991e8b2ef8e62c5db65bc4ee7e3ab91c232df8df
tree445a0619a6b4d8d61852494073e8785a3a5a2656
parentae96631796a4456e6f14c99abbaff58d70158607
powerpc/pseries/pci: Add a msi_free() handler to clear XIVE data

The MSI domain clears the IRQ with msi_domain_free(), which calls
irq_domain_free_irqs_top(), which clears the handler data. This is a
problem for the XIVE controller since we need to unmap MMIO pages and
free a specific XIVE structure.

The 'msi_free()' handler is called before irq_domain_free_irqs_top()
when the handler data is still available. Use that to clear the XIVE
controller data.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210701132750.1475580-10-clg@kaod.org
arch/powerpc/include/asm/xive.h
arch/powerpc/platforms/pseries/msi.c
arch/powerpc/sysdev/xive/common.c