powerpc/powernv: Provide facilities for EOI, usable from real mode
authorSuresh Warrier <warrier@linux.vnet.ibm.com>
Fri, 19 Aug 2016 05:35:49 +0000 (15:35 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 9 Sep 2016 06:17:59 +0000 (16:17 +1000)
commit4ee11c1a9f7cc20026bb66ac624533310a605312
treea93e00dd3a4598ca60daff910a03079f188b92a4
parent07b1fdf5bd135d94eff2b3a6849b90c358963066
powerpc/powernv: Provide facilities for EOI, usable from real mode

This adds a new function pnv_opal_pci_msi_eoi() which does the part of
end-of-interrupt (EOI) handling of an MSI which involves doing an
OPAL call.  This function can be called in real mode.  This doesn't
just export pnv_ioda2_msi_eoi() because that does a call to
icp_native_eoi(), which does not work in real mode.

This also adds a function, is_pnv_opal_msi(), which KVM can call to
check whether an interrupt is one for which we should be calling
pnv_opal_pci_msi_eoi() when we need to do an EOI.

[paulus@ozlabs.org - split out the addition of pnv_opal_pci_msi_eoi()
 from Suresh's patch "KVM: PPC: Book3S HV: Handle passthrough
 interrupts in guest"; added is_pnv_opal_msi(); wrote description.]

Signed-off-by: Suresh Warrier <warrier@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/pnv-pci.h
arch/powerpc/platforms/powernv/pci-ioda.c