]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
pci: add a segment parameter to pci_hide_device
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 26 Nov 2018 14:42:19 +0000 (15:42 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Nov 2018 14:42:19 +0000 (15:42 +0100)
No functional change expected.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/char/ehci-dbgp.c
xen/drivers/char/ns16550.c
xen/drivers/passthrough/pci.c
xen/drivers/video/vga.c
xen/include/xen/pci.h

index d0071d3114a9a826f37b89da1fcfafdbff523ac8..475dc417679fb9ab84d028a8f528f951457da7a9 100644 (file)
@@ -1362,7 +1362,7 @@ static void __init ehci_dbgp_init_postirq(struct serial_port *port)
 
     ehci_dbgp_setup_postirq(dbgp);
 
-    pci_hide_device(dbgp->bus, PCI_DEVFN(dbgp->slot, dbgp->func));
+    pci_hide_device(0, dbgp->bus, PCI_DEVFN(dbgp->slot, dbgp->func));
 }
 
 static int ehci_dbgp_check_release(struct ehci_dbgp *dbgp)
index f32dbd324798c4450d8c99bd0b0cd4c593ea2eee..3c66e65b1cfbc56ae7c59d10552876bd0d855d6d 100644 (file)
@@ -761,7 +761,7 @@ static void __init ns16550_init_postirq(struct serial_port *port)
     if ( uart->bar || uart->ps_bdf_enable )
     {
         if ( !uart->param )
-            pci_hide_device(uart->ps_bdf[0], PCI_DEVFN(uart->ps_bdf[1],
+            pci_hide_device(0, uart->ps_bdf[0], PCI_DEVFN(uart->ps_bdf[1],
                             uart->ps_bdf[2]));
         else
         {
index e5b96027622a29b8fc3e31355ae87de0479a2c8f..7584ce2fbbcb8a831d4a6a276cfdc5546447f303 100644 (file)
@@ -440,17 +440,23 @@ static void _pci_hide_device(struct pci_dev *pdev)
     list_add(&pdev->domain_list, &dom_xen->arch.pdev_list);
 }
 
-int __init pci_hide_device(int bus, int devfn)
+int __init pci_hide_device(unsigned int seg, unsigned int bus,
+                           unsigned int devfn)
 {
     struct pci_dev *pdev;
+    struct pci_seg *pseg;
     int rc = -ENOMEM;
 
     pcidevs_lock();
-    pdev = alloc_pdev(get_pseg(0), bus, devfn);
-    if ( pdev )
+    pseg = alloc_pseg(seg);
+    if ( pseg )
     {
-        _pci_hide_device(pdev);
-        rc = 0;
+        pdev = alloc_pdev(pseg, bus, devfn);
+        if ( pdev )
+        {
+            _pci_hide_device(pdev);
+            rc = 0;
+        }
     }
     pcidevs_unlock();
 
index 7dc07b13ed04c9aea77441f87f6eb3bfe9673d58..6a64fd90135ab01acfcf855cb8b44ac7e2984112 100644 (file)
@@ -157,7 +157,7 @@ void __init video_endboot(void)
                 {
                     printk(XENLOG_INFO "Boot video device %02x:%02x.%u\n",
                            bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
-                    pci_hide_device(bus, devfn);
+                    pci_hide_device(0, bus, devfn);
                 }
             }
     }
index 580e820a33de3f572ac736273a9135a7ed14cc3c..3c361cf0c031796f6328dbb2e2421c8158903469 100644 (file)
@@ -150,7 +150,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
                    const struct pci_dev_info *, nodeid_t node);
 int pci_remove_device(u16 seg, u8 bus, u8 devfn);
 int pci_ro_device(int seg, int bus, int devfn);
-int pci_hide_device(int bus, int devfn);
+int pci_hide_device(unsigned int seg, unsigned int bus, unsigned int devfn);
 struct pci_dev *pci_get_pdev(int seg, int bus, int devfn);
 struct pci_dev *pci_get_real_pdev(int seg, int bus, int devfn);
 struct pci_dev *pci_get_pdev_by_domain(const struct domain *, int seg,