[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFCv4,17/35] plat/pci_bus: Split specific code into different files

I've found a simpler fix to the problem described in the previous mail.

Since we have a static pci_bus_handler (ph) declared in pci_bus_x86.c, we can
use it and initialize ph.a in arch_pci_probe(). In this way, we can keep the 
of the code intact, without any modification in function headers (other than
arch_pci_probe, where we need to add the uk_alloc parameter).

Here is the diff between the initial "pci_bus_x86.c" source file and the fixed 

--- pci_bus_x86_original.c      2021-03-14 20:34:34.610336281 +0200
+++ pci_bus_x86.c       2021-03-22 17:53:24.487358411 +0200
@@ -207,12 +207,14 @@
-int arch_pci_probe(void)
+int arch_pci_probe(struct uk_alloc *pha)
        uint32_t config_addr, function, header_type, vendor_id;
        uk_pr_debug("Probe PCI\n");
+       ph.a = pha;
        config_addr = (PCI_ENABLE_BIT);
        PCI_CONF_READ(uint32_t, &header_type,
                        config_addr, HEADER_TYPE);

Reviewed-by: Razvan Virtan <virtanrazvan@xxxxxxxxx>



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.