From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Kardashevskiy Subject: [PATCH kernel v4 5/6] pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge Date: Fri, 30 Jun 2017 15:24:35 +1000 Message-ID: <20170630052436.15212-6-aik@ozlabs.ru> References: <20170630052436.15212-1-aik@ozlabs.ru> Cc: Alexey Kardashevskiy , David Gibson , Alex Williamson , Bjorn Helgaas , Yongji Xie , Eric Auger , Yongji Xie To: kvm@vger.kernel.org Return-path: Received: from ozlabs.ru ([107.173.13.209]:39518 "EHLO ozlabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751935AbdF3FYu (ORCPT ); Fri, 30 Jun 2017 01:24:50 -0400 In-Reply-To: <20170630052436.15212-1-aik@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: From: Yongji Xie Any IODA host bridge have the capability of IRQ remapping. So we set PCI_BUS_FLAGS_MSI_REMAP when this kind of host birdge is detected. Signed-off-by: Yongji Xie Reviewed-by: Alexey Kardashevskiy Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/platforms/powernv/pci-ioda.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 283caf1070c9..8456e07cfc68 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -3177,6 +3177,12 @@ static void pnv_pci_ioda_fixup(void) #endif } +int pnv_pci_ioda_root_bridge_prepare(struct pci_host_bridge *bridge) +{ + bridge->bus->bus_flags |= PCI_BUS_FLAGS_MSI_REMAP; + return 0; +} + /* * Returns the alignment for I/O or memory windows for P2P * bridges. That actually depends on how PEs are segmented. @@ -3860,6 +3866,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np, * the child P2P bridges) can form individual PE. */ ppc_md.pcibios_fixup = pnv_pci_ioda_fixup; + ppc_md.pcibios_root_bridge_prepare = pnv_pci_ioda_root_bridge_prepare; if (phb->type == PNV_PHB_NPU) { hose->controller_ops = pnv_npu_ioda_controller_ops; -- 2.11.0