From: Chris Lalancette <clalance@redhat.com> Date: Mon, 13 Jul 2009 09:43:27 +0200 Subject: [xen] ia64: fix rmmod of PCI devices Message-id: 4A5AE59F.7060508@redhat.com O-Subject: [RHEL5.4 PATCH]: Fix stack trace on rmmod of PCI devices on ia64 xen Bugzilla: 507520 RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: Prarit Bhargava <prarit@redhat.com> RH-Acked-by: Justin M. Forbes <jforbes@redhat.com> All, The VT-d changes that were committed for 5.4 added some code in the rmmod path for PCI devices. Unfortunately, they added a physdevop (PHYSDEVOP_manage_pci_remove) that does not exist on ia64 xen. This causes a stack trace when trying to rmmod any PCI driver. One possible solution would be to backport the ia64 hypervisor changes to support this hypercall, but that would involve backporting most of ia64 VT-d, which is way too risky. Instead, this simple patch just avoids calling this physdevop on ia64, and fixes the problem for me. This should solve BZ 507520. Please review and ACK. -- Chris Lalancette diff --git a/drivers/xen/core/pci.c b/drivers/xen/core/pci.c index 57bcf84..0c3b241 100644 --- a/drivers/xen/core/pci.c +++ b/drivers/xen/core/pci.c @@ -37,8 +37,10 @@ static int pci_bus_remove_wrapper(struct device *dev) r = pci_bus_remove(dev); /* dev and pci_dev are no longer valid!! */ +#ifndef __ia64__ WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove, &manage_pci)); +#endif return r; }