]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler
authorCédric Le Goater <clg@kaod.org>
Thu, 30 Sep 2021 10:25:35 +0000 (12:25 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Oct 2021 12:33:25 +0000 (23:33 +1100)
commit80f8e0f80ef2f164497e0a1d36dfd217003a2f08
treee7d80770bd40d4ddf25515b4d419c4d3675ce8d9
parent240ad202fdf54e56ce8a2e77db48a05b5887f8da
powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler

The IPR drivers tests for MSI support at probe time with MSI vector 0
and when done, frees the IRQ with free_irq(). This test was introduced
by 4a81eda3746c ("ipr: add test for MSI interrupt support") as an
improvement of commit 1231b47bfc2c ("[SCSI] ipr: add MSI support")
because a boot failure was reported on a Bimini PowerPC system:

  https://lore.kernel.org/r/1242926159.3007.5.camel@localhost.localdomain

It was finally decided to remove MSI support on Bimini systems in
c63e75948681 ("powerpc/maple: Add a quirk to disable MSI for IPR on
Bimini").

Linux 5.15-rc1 added MSI domain support to the pseries machine and
when free_irq is called() in the driver, msi_domain_deactivate() also
is. This resets the MSI table entry of the associate vector by calling
__pci_write_msi_msg() with an empty message and breaks any further
activation of the same vector. In the case of the IPR driver, it
breaks the initialization sequence of the IOA.

Introduce an empty irq_write_msi_msg() handler in the MSI domain of
the pseries machine to avoid clearing the MSI vector entry. Updating
the entry is not strictly necessary since it is initialized by the
underlying hypervisor, PowerVM or QEMU/KVM.

Fixes: c0628f0c7bfa ("powerpc/pseries/pci: Add MSI domains")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Tested-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
[mpe: Tweak comment wording and formatting slightly]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210930102535.1047230-1-clg@kaod.org
arch/powerpc/platforms/pseries/msi.c