[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346622965-30937-5-git-send-email-yinghai@kernel.org>
Date: Sun, 2 Sep 2012 14:56:02 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Taku Izumi <izumi.taku@...fujitsu.com>,
Jiang Liu <jiang.liu@...wei.com>, x86 <x86@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH part5 4/7] ACPI, PCI: Stop pci devices before acpi_pci_driver remove calling
During stop pci drivers, it still need to access ioapic and iommu.
So need to make sure those drivers need to be stop at first.
Also change the acpi_pci_drivers remove calling sequence to reverse.
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
drivers/acpi/pci_root.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index f3402df..59aa947 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -659,10 +659,6 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
mutex_lock(&acpi_pci_root_lock);
- list_for_each_entry(driver, &acpi_pci_drivers, node)
- if (driver->remove)
- driver->remove(root->device->handle);
-
/* that root bus could be removed already */
if (!pci_find_bus(root->segment, root->secondary.start)) {
dev_printk(KERN_DEBUG, &device->dev,
@@ -670,6 +666,13 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
goto out;
}
+ /* stop normal pci drivers before we stop ioapic and dmar etc */
+ pci_stop_bus_devices(root->bus);
+
+ list_for_each_entry_reverse(driver, &acpi_pci_drivers, node)
+ if (driver->remove)
+ driver->remove(root->device->handle);
+
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
--
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists