Commit 93e01a50 authored by Gavin Shan's avatar Gavin Shan Committed by Michael Ellerman

powerpc/powernv: Make pnv_ioda_deconfigure_pe() visible

pnv_ioda_deconfigure_pe() is visible only when CONFIG_PCI_IOV is
enabled. The function will be used to tear down PE's associated
mapping in PCI hotplug path that doesn't depend on CONFIG_PCI_IOV.

This makes pnv_ioda_deconfigure_pe() visible and not depend on
CONFIG_PCI_IOV.
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 40e2a47e
...@@ -712,7 +712,6 @@ static int pnv_ioda_set_peltv(struct pnv_phb *phb, ...@@ -712,7 +712,6 @@ static int pnv_ioda_set_peltv(struct pnv_phb *phb,
return 0; return 0;
} }
#ifdef CONFIG_PCI_IOV
static int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe) static int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
{ {
struct pci_dev *parent; struct pci_dev *parent;
...@@ -747,9 +746,11 @@ static int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe) ...@@ -747,9 +746,11 @@ static int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
} }
rid_end = pe->rid + (count << 8); rid_end = pe->rid + (count << 8);
} else { } else {
#ifdef CONFIG_PCI_IOV
if (pe->flags & PNV_IODA_PE_VF) if (pe->flags & PNV_IODA_PE_VF)
parent = pe->parent_dev; parent = pe->parent_dev;
else else
#endif
parent = pe->pdev->bus->self; parent = pe->pdev->bus->self;
bcomp = OpalPciBusAll; bcomp = OpalPciBusAll;
dcomp = OPAL_COMPARE_RID_DEVICE_NUMBER; dcomp = OPAL_COMPARE_RID_DEVICE_NUMBER;
...@@ -787,11 +788,12 @@ static int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe) ...@@ -787,11 +788,12 @@ static int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
pe->pbus = NULL; pe->pbus = NULL;
pe->pdev = NULL; pe->pdev = NULL;
#ifdef CONFIG_PCI_IOV
pe->parent_dev = NULL; pe->parent_dev = NULL;
#endif
return 0; return 0;
} }
#endif /* CONFIG_PCI_IOV */
static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe) static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
{ {
......
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