Have callers invoke pci_add_segment() directly instead: With radix tree
initialization moved out of the function, its name isn't quite
describing anymore what it actually does.
On x86 move the logic into __start_xen() itself, to reduce the risk of
re-introducing ordering issues like the one which was addressed by
26fe09e34566 ("radix-tree: introduce RADIX_TREE{,_INIT}()").
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Julien Grall <jgrall@amazon.com>
if ( !pci_passthrough_enabled )
return 0;
- pci_segments_init();
+ if ( pci_add_segment(0) )
+ panic("Could not initialize PCI segment 0\n");
if ( acpi_disabled )
return dt_pci_init();
*/
setup_system_domains();
+ /*
+ * Ahead of any ACPI table parsing make sure we have control structures
+ * for PCI segment 0.
+ */
+ if ( pci_add_segment(0) )
+ panic("Could not initialize PCI segment 0\n");
+
/*
* IOMMU-related ACPI table parsing has to happen before APIC probing, for
* check_x2apic_preenabled() to be able to observe respective findings, in
{
bool valid = true;
- pci_segments_init();
-
/* MMCONFIG disabled */
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
return;
return rc;
}
-void __init pci_segments_init(void)
-{
- if ( !alloc_pseg(0) )
- panic("Could not initialize PCI segment 0\n");
-}
-
int __init pci_add_segment(u16 seg)
{
return alloc_pseg(seg) ? 0 : -ENOMEM;
int (*handler)(uint8_t devfn,
struct pci_dev *pdev));
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,