WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][LINUX] don't WARN_ON -ENOSYS from PHYSDEVOP_manage_p

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][LINUX] don't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 07 Aug 2008 15:17:10 -0600
Cc: Keir Fraser <keir.fraser@xxxxxxxxxx>
Delivery-date: Thu, 07 Aug 2008 14:17:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
We let -ENOSYS slip through on the add side to support old hypervisors,
let's do the same on the remove end so we don't get stack dumps during
bootup.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
--

diff -r 2866e6af503e drivers/xen/core/pci.c
--- a/drivers/xen/core/pci.c    Thu Jul 31 15:33:54 2008 +0100
+++ b/drivers/xen/core/pci.c    Thu Aug 07 15:14:07 2008 -0600
@@ -23,9 +23,13 @@ static int pci_bus_probe_wrapper(struct 
                return r;
 
        r = pci_bus_probe(dev);
-       if (r)
-               WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
-                                             &manage_pci));
+       if (r) {
+               int ret;
+
+               ret = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
+                                           &manage_pci);
+               WARN_ON(ret && ret != -ENOSYS);
+       }
 
        return r;
 }



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][LINUX] don't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove, Alex Williamson <=