x86/mmcfg: rename pt_pci_init() and call it from acpi_mmcfg_init()
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Fri, 17 Aug 2018 13:04:27 +0000 (15:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Aug 2018 13:04:27 +0000 (15:04 +0200)
Given what pt_pci_init() actually does, rename it properly and move its
declaration to pci.h. Move the only call into acpi_mmcfg_init().

No functional change.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Tested-by: Gopalasetty, Manoj <manoj.gopalasetty@hpe.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/setup.c
xen/arch/x86/x86_64/mmconfig-shared.c
xen/drivers/passthrough/pci.c
xen/include/xen/iommu.h
xen/include/xen/pci.h

index 8d0f6f14e3e91c292a48c6c5f3a855641df4e104..a22256f0cd30b0f68884b9e586c25e169869d5b6 100644 (file)
@@ -1609,8 +1609,6 @@ void __init noreturn __start_xen(unsigned long mbi_p)
 
     local_irq_enable();
 
-    pt_pci_init();
-
     vesa_mtrr_init();
 
     acpi_mmcfg_init();
index 4a6ca26801e3dcbcb0e855c5e7eff8eae88d8e19..8675dbd1eddc65e9e9ca16b89624aa429d509d96 100644 (file)
@@ -400,6 +400,8 @@ void __init acpi_mmcfg_init(void)
 {
     bool_t valid = 1;
 
+    pci_segments_init();
+
     /* MMCONFIG disabled */
     if ((pci_probe & PCI_PROBE_MMCONF) == 0)
         return;
index c4890a4295254266c2fdb2b0d977864037e30b90..d1adffa095ffdfb070c99a4b633f5e6a6c4276e5 100644 (file)
@@ -126,7 +126,7 @@ static int pci_segments_iterate(
     return rc;
 }
 
-void __init pt_pci_init(void)
+void __init pci_segments_init(void)
 {
     radix_tree_init(&pci_segments);
     if ( !alloc_pseg(0) )
index 6b42e3b87692fc41ec27ccf018cf0abe2d929d8a..e35d941f3cb2efc07bd4c93080ed41ccf9fe47c0 100644 (file)
@@ -92,8 +92,6 @@ struct domain_iommu {
 #define iommu_clear_feature(d, f) clear_bit(f, dom_iommu(d)->features)
 
 #ifdef CONFIG_HAS_PCI
-void pt_pci_init(void);
-
 struct pirq;
 int hvm_do_IRQ_dpci(struct domain *, struct pirq *);
 int pt_irq_create_bind(struct domain *, const struct xen_domctl_bind_pt_irq *);
index 4cfa7746154061155cab9d8323b91d25cee86c7e..580e820a33de3f572ac736273a9135a7ed14cc3c 100644 (file)
@@ -143,6 +143,7 @@ struct pci_dev *pci_lock_domain_pdev(
 void setup_hwdom_pci_devices(struct domain *,
                             int (*)(u8 devfn, struct pci_dev *));
 int pci_release_devices(struct domain *d);
+void pci_segments_init(void);
 int pci_add_segment(u16 seg);
 const unsigned long *pci_get_ro_map(u16 seg);
 int pci_add_device(u16 seg, u8 bus, u8 devfn,