linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4
@ 2012-09-02 21:54 Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 01/11] PCI: Fix a device reference count leakage issue in pci_dev_present() Yinghai Lu
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu

This is core part of ACPI pci root bus hotplug support.

First add pci_stop_and_remove_bus support, so could use it to remove root bus.

Separate out hot add from acpiphp. User could only use pci_root_hp and pciehp.
And add hot removal notification support.

could get from
        git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug-part4

Jiang Liu (3):
  PCI: Fix a device reference count leakage issue in pci_dev_present()
  PCI: Correctly clean up pci root buses in function pci_remove_bus()
  PCI: Fix an access-after-free issue in function pci_stop_and_remove_bus()

Yinghai Lu (8):
  PCI: Add pci_stop_and_remove_bus()
  PCI, acpiphp: Separate out hot-add support of pci host bridge
  PCI, ACPI: Make acpi_pci_root_remove remove pci root bus too
  PCI, ACPI: Add pci_root_hp hot removal notification support.
  PCI, ACPI: Add alloc_acpi_hp_work()
  PCI, acpiphp: Use acpi_hp_work
  PCI, pci_root_hp: Use acpi_hp_work
  PCI, ACPI: Make kacpi_hotplug_wq static

 drivers/acpi/Makefile              |    1 +
 drivers/acpi/osl.c                 |   24 +++-
 drivers/acpi/pci_root.c            |   14 ++
 drivers/acpi/pci_root_hp.c         |  271 ++++++++++++++++++++++++++++++++++++
 drivers/pci/hotplug/acpiphp_glue.c |   79 ++---------
 drivers/pci/remove.c               |   44 +++++-
 drivers/pci/search.c               |   10 +-
 include/acpi/acpiosxf.h            |    9 +-
 include/linux/pci.h                |    1 +
 9 files changed, 374 insertions(+), 79 deletions(-)
 create mode 100644 drivers/acpi/pci_root_hp.c

-- 
1.7.7


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH part4 01/11] PCI: Fix a device reference count leakage issue in pci_dev_present()
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 02/11] PCI: Correctly clean up pci root buses in function pci_remove_bus() Yinghai Lu
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi

From: Jiang Liu <jiang.liu@huawei.com>

Function pci_get_dev_by_id() will hold a reference count on the pci device
returned, so pci_dev_present() should release the corresponding reference
count to avoid memory leakage.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
 drivers/pci/search.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index d84cdcf..cd11bd8 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -338,13 +338,13 @@ int pci_dev_present(const struct pci_device_id *ids)
 	WARN_ON(in_interrupt());
 	while (ids->vendor || ids->subvendor || ids->class_mask) {
 		found = pci_get_dev_by_id(ids, NULL);
-		if (found)
-			goto exit;
+		if (found) {
+			pci_dev_put(found);
+			return 1;
+		}
 		ids++;
 	}
-exit:
-	if (found)
-		return 1;
+
 	return 0;
 }
 EXPORT_SYMBOL(pci_dev_present);
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 02/11] PCI: Correctly clean up pci root buses in function pci_remove_bus()
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 01/11] PCI: Fix a device reference count leakage issue in pci_dev_present() Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 03/11] PCI: Add pci_stop_and_remove_bus() Yinghai Lu
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu

From: Jiang Liu <jiang.liu@huawei.com>

The function pci_create_root_bus() allocates the pci bus structure,
registers the bus device and creates the legacy files for a pci root
bus, but returns without setting the is_added flag. The is_added flag
for a pci root bus will be set by function pci_scan_child_bus().
If a pci root bus is destroyed before calling pci_scan_child_bus(),
the is_added flag will not be set.  So teach function pci_remove_bus()
to detect such a case and correctly clean up pci root buses.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 drivers/pci/remove.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index aaae16e..b9f553b 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -48,11 +48,10 @@ void pci_remove_bus(struct pci_bus *bus)
 	list_del(&bus->node);
 	pci_bus_release_busn_res(bus);
 	up_write(&pci_bus_sem);
-	if (!bus->is_added)
-		return;
-
-	pci_remove_legacy_files(bus);
-	device_unregister(&bus->dev);
+	if (bus->is_added || pci_is_root_bus(bus)) {
+		pci_remove_legacy_files(bus);
+		device_unregister(&bus->dev);
+	}
 }
 EXPORT_SYMBOL(pci_remove_bus);
 
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 03/11] PCI: Add pci_stop_and_remove_bus()
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 01/11] PCI: Fix a device reference count leakage issue in pci_dev_present() Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 02/11] PCI: Correctly clean up pci root buses in function pci_remove_bus() Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 04/11] PCI: Fix an access-after-free issue in function pci_stop_and_remove_bus() Yinghai Lu
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu

It supports both pci root bus and pci bus under pci bridge.

-v2: clear pci_bridge's subordinate.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 drivers/pci/remove.c |   32 ++++++++++++++++++++++++++++++++
 include/linux/pci.h  |    1 +
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index b9f553b..94407d4 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -136,3 +136,35 @@ void pci_stop_and_remove_behind_bridge(struct pci_dev *dev)
 	if (dev->subordinate)
 		pci_remove_bus_devices(dev->subordinate);
 }
+
+static void pci_stop_host_bridge(struct pci_host_bridge *bridge)
+{
+	device_unregister(&bridge->dev);
+}
+/*
+ * it will support pci root bus too, in that case we need
+ *  stop and remove host bridge
+ */
+void pci_stop_and_remove_bus(struct pci_bus *bus)
+{
+	struct pci_host_bridge *host_bridge = NULL;
+	struct pci_dev *pci_bridge = NULL;
+
+	pci_stop_bus_devices(bus);
+
+	if (pci_is_root_bus(bus)) {
+		host_bridge = to_pci_host_bridge(bus->bridge);
+		pci_stop_host_bridge(host_bridge);
+	} else
+		pci_bridge = bus->self;
+
+	pci_remove_bus_devices(bus);
+
+	pci_remove_bus(bus);
+
+	if (host_bridge)
+		host_bridge->bus = NULL;
+
+	if (pci_bridge)
+		pci_bridge->subordinate = NULL;
+}
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 4446448..8b2c722 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -738,6 +738,7 @@ extern void pci_remove_bus(struct pci_bus *b);
 extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
 void pci_stop_bus_devices(struct pci_bus *bus);
 void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
+void pci_stop_and_remove_bus(struct pci_bus *bus);
 void pci_setup_cardbus(struct pci_bus *bus);
 extern void pci_sort_breadthfirst(void);
 #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 04/11] PCI: Fix an access-after-free issue in function pci_stop_and_remove_bus()
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (2 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 03/11] PCI: Add pci_stop_and_remove_bus() Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 05/11] PCI, acpiphp: Separate out hot-add support of pci host bridge Yinghai Lu
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu

From: Jiang Liu <jiang.liu@huawei.com>

If pci_stop_and_remove_bus() is called to remove a pci root bus,
the host_bridge structure may have already been freed after returning
from pci_remove_bus(). To avoid that, hold an extra reference count
to the root bus before calling pci_remove_bus(), so we can safely
access the pci_host_bridge structure after returning from function
pci_remove_bus().

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 drivers/pci/remove.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 94407d4..40f8148 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -154,6 +154,7 @@ void pci_stop_and_remove_bus(struct pci_bus *bus)
 
 	if (pci_is_root_bus(bus)) {
 		host_bridge = to_pci_host_bridge(bus->bridge);
+		get_device(&host_bridge->dev);
 		pci_stop_host_bridge(host_bridge);
 	} else
 		pci_bridge = bus->self;
@@ -162,8 +163,10 @@ void pci_stop_and_remove_bus(struct pci_bus *bus)
 
 	pci_remove_bus(bus);
 
-	if (host_bridge)
+	if (host_bridge) {
 		host_bridge->bus = NULL;
+		put_device(&host_bridge->dev);
+	}
 
 	if (pci_bridge)
 		pci_bridge->subordinate = NULL;
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 05/11] PCI, acpiphp: Separate out hot-add support of pci host bridge
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (3 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 04/11] PCI: Fix an access-after-free issue in function pci_stop_and_remove_bus() Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 06/11] PCI, ACPI: Make acpi_pci_root_remove remove pci root bus too Yinghai Lu
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu

It causes confusion.

We may only need acpi hp for pci host bridge.

Split host bridge hot-add support to pci_root_hp, and keep acpiphp simple.

Also remove not used res_lock in the struct.

-v2: put back pci_root_hp change in one patch
-v3: add pcibios_resource_survey_bus() calling
-v4: remove not needed code with remove_bridge
-v5: put back support for acpiphp support for slots just on root bus.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 drivers/acpi/Makefile              |    1 +
 drivers/acpi/pci_root_hp.c         |  238 ++++++++++++++++++++++++++++++++++++
 drivers/pci/hotplug/acpiphp_glue.c |   37 +-----
 3 files changed, 246 insertions(+), 30 deletions(-)
 create mode 100644 drivers/acpi/pci_root_hp.c

diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 47199e2..c9abd4c 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -36,6 +36,7 @@ acpi-y				+= processor_core.o
 acpi-y				+= ec.o
 acpi-$(CONFIG_ACPI_DOCK)	+= dock.o
 acpi-y				+= pci_root.o pci_link.o pci_irq.o pci_bind.o
+acpi-$(CONFIG_HOTPLUG)		+= pci_root_hp.o
 acpi-y				+= power.o
 acpi-y				+= event.o
 acpi-y				+= sysfs.o
diff --git a/drivers/acpi/pci_root_hp.c b/drivers/acpi/pci_root_hp.c
new file mode 100644
index 0000000..e07c31b
--- /dev/null
+++ b/drivers/acpi/pci_root_hp.c
@@ -0,0 +1,238 @@
+/*
+ * Separated from drivers/pci/hotplug/acpiphp_glue.c
+ *	only support root bridge
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/mutex.h>
+#include <linux/slab.h>
+#include <linux/acpi.h>
+
+static LIST_HEAD(acpi_root_bridge_list);
+struct acpi_root_bridge {
+	struct list_head list;
+	acpi_handle handle;
+	u32 flags;
+};
+
+/* bridge flags */
+#define ROOT_BRIDGE_HAS_EJ0	(0x00000002)
+#define ROOT_BRIDGE_HAS_PS3	(0x00000080)
+
+#define ACPI_STA_FUNCTIONING	(0x00000008)
+
+static struct acpi_root_bridge *acpi_root_handle_to_bridge(acpi_handle handle)
+{
+	struct acpi_root_bridge *bridge;
+
+	list_for_each_entry(bridge, &acpi_root_bridge_list, list)
+		if (bridge->handle == handle)
+			return bridge;
+
+	return NULL;
+}
+
+/* allocate and initialize host bridge data structure */
+static void add_acpi_root_bridge(acpi_handle handle)
+{
+	struct acpi_root_bridge *bridge;
+	acpi_handle dummy_handle;
+	acpi_status status;
+
+	/* if the bridge doesn't have _STA, we assume it is always there */
+	status = acpi_get_handle(handle, "_STA", &dummy_handle);
+	if (ACPI_SUCCESS(status)) {
+		unsigned long long tmp;
+
+		status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
+		if (ACPI_FAILURE(status)) {
+			printk(KERN_DEBUG "%s: _STA evaluation failure\n",
+						 __func__);
+			return;
+		}
+		if ((tmp & ACPI_STA_FUNCTIONING) == 0)
+			/* don't register this object */
+			return;
+	}
+
+	bridge = kzalloc(sizeof(struct acpi_root_bridge), GFP_KERNEL);
+	if (!bridge)
+		return;
+
+	bridge->handle = handle;
+
+	if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &dummy_handle)))
+		bridge->flags |= ROOT_BRIDGE_HAS_EJ0;
+	if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS3", &dummy_handle)))
+		bridge->flags |= ROOT_BRIDGE_HAS_PS3;
+
+	list_add(&bridge->list, &acpi_root_bridge_list);
+}
+
+struct acpi_root_hp_work {
+	struct work_struct work;
+	acpi_handle handle;
+	u32 type;
+	void *context;
+};
+
+static void alloc_acpi_root_hp_work(acpi_handle handle, u32 type,
+					void *context,
+					void (*func)(struct work_struct *work))
+{
+	struct acpi_root_hp_work *hp_work;
+	int ret;
+
+	hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
+	if (!hp_work)
+		return;
+
+	hp_work->handle = handle;
+	hp_work->type = type;
+	hp_work->context = context;
+
+	INIT_WORK(&hp_work->work, func);
+	ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
+	if (!ret)
+		kfree(hp_work);
+}
+
+/* Program resources in newly inserted bridge */
+static void acpi_root_configure_bridge(acpi_handle handle)
+{
+	struct acpi_pci_root *root = acpi_pci_find_root(handle);
+
+	pcibios_resource_survey_bus(root->bus);
+	pci_assign_unassigned_bus_resources(root->bus);
+}
+
+static void handle_root_bridge_insertion(acpi_handle handle)
+{
+	struct acpi_device *device, *pdevice;
+	acpi_handle phandle;
+	int ret_val;
+
+	acpi_get_parent(handle, &phandle);
+	if (acpi_bus_get_device(phandle, &pdevice)) {
+		printk(KERN_DEBUG "no parent device, assuming NULL\n");
+		pdevice = NULL;
+	}
+	if (!acpi_bus_get_device(handle, &device)) {
+		/* check if  pci root_bus is removed */
+		struct acpi_pci_root *root = acpi_driver_data(device);
+		if (pci_find_bus(root->segment, root->secondary.start))
+			return;
+
+		printk(KERN_DEBUG "bus exists... trim\n");
+		/* this shouldn't be in here, so remove
+		 * the bus then re-add it...
+		 */
+		ret_val = acpi_bus_trim(device, 1);
+		printk(KERN_DEBUG "acpi_bus_trim return %x\n", ret_val);
+	}
+	if (acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE)) {
+		printk(KERN_ERR "cannot add bridge to acpi list\n");
+		return;
+	}
+	acpi_root_configure_bridge(handle);
+	if (acpi_bus_start(device))
+		printk(KERN_ERR "cannot start bridge\n");
+}
+
+static void _handle_hotplug_event_root(struct work_struct *work)
+{
+	struct acpi_root_bridge *bridge;
+	char objname[64];
+	struct acpi_buffer buffer = { .length = sizeof(objname),
+				      .pointer = objname };
+	struct acpi_root_hp_work *hp_work;
+	acpi_handle handle;
+	u32 type;
+
+	hp_work = container_of(work, struct acpi_root_hp_work, work);
+	handle = hp_work->handle;
+	type = hp_work->type;
+
+	bridge = acpi_root_handle_to_bridge(handle);
+
+	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+
+	switch (type) {
+	case ACPI_NOTIFY_BUS_CHECK:
+		/* bus enumerate */
+		printk(KERN_DEBUG "%s: Bus check notify on %s\n", __func__,
+				 objname);
+		if (!bridge) {
+			handle_root_bridge_insertion(handle);
+			add_acpi_root_bridge(handle);
+		}
+
+		break;
+
+	case ACPI_NOTIFY_DEVICE_CHECK:
+		/* device check */
+		printk(KERN_DEBUG "%s: Device check notify on %s\n", __func__,
+				 objname);
+		if (!bridge) {
+			handle_root_bridge_insertion(handle);
+			add_acpi_root_bridge(handle);
+		}
+		break;
+
+	default:
+		printk(KERN_WARNING "notify_handler: unknown event type 0x%x for %s\n",
+				 type, objname);
+		break;
+	}
+
+	kfree(hp_work); /* allocated in handle_hotplug_event_bridge */
+}
+
+static void handle_hotplug_event_root(acpi_handle handle, u32 type,
+					void *context)
+{
+	alloc_acpi_root_hp_work(handle, type, context,
+				_handle_hotplug_event_root);
+}
+
+static acpi_status __init
+find_root_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
+{
+	char objname[64];
+	struct acpi_buffer buffer = { .length = sizeof(objname),
+				      .pointer = objname };
+	int *count = (int *)context;
+
+	if (!acpi_is_root_bridge(handle))
+		return AE_OK;
+
+	(*count)++;
+
+	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+
+	acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
+				handle_hotplug_event_root, NULL);
+	printk(KERN_DEBUG "acpi root: %s notify handler installed\n", objname);
+
+	add_acpi_root_bridge(handle);
+
+	return AE_OK;
+}
+
+static int __init acpi_pci_root_hp_init(void)
+{
+	int num = 0;
+
+	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+		ACPI_UINT32_MAX, find_root_bridges, NULL, &num, NULL);
+
+	printk(KERN_DEBUG "Found %d acpi root devices\n", num);
+
+	return 0;
+}
+
+subsys_initcall(acpi_pci_root_hp_init);
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 6cb1923..dc54d57 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -521,10 +521,13 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
 	acpi_status status;
 	acpi_handle handle = bridge->handle;
 
-	status = acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
+	if (bridge->type != BRIDGE_TYPE_HOST) {
+		status = acpi_remove_notify_handler(handle,
+					    ACPI_SYSTEM_NOTIFY,
 					    handle_hotplug_event_bridge);
-	if (ACPI_FAILURE(status))
-		err("failed to remove notify handler\n");
+		if (ACPI_FAILURE(status))
+			err("failed to remove notify handler\n");
+	}
 
 	if ((bridge->type != BRIDGE_TYPE_HOST) &&
 	    ((bridge->flags & BRIDGE_HAS_EJ0) && bridge->func)) {
@@ -607,9 +610,6 @@ static void remove_bridge(acpi_handle handle)
 	bridge = acpiphp_handle_to_bridge(handle);
 	if (bridge)
 		cleanup_bridge(bridge);
-	else
-		acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
-					   handle_hotplug_event_bridge);
 }
 
 static int power_on_slot(struct acpiphp_slot *slot)
@@ -1416,21 +1416,6 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type,
 			      _handle_hotplug_event_func);
 }
 
-static acpi_status
-find_root_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
-{
-	int *count = (int *)context;
-
-	if (!acpi_is_root_bridge(handle))
-		return AE_OK;
-
-	(*count)++;
-	acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
-				    handle_hotplug_event_bridge, NULL);
-
-	return AE_OK ;
-}
-
 static struct acpi_pci_driver acpi_pci_hp_driver = {
 	.add =		add_bridge,
 	.remove =	remove_bridge,
@@ -1441,15 +1426,7 @@ static struct acpi_pci_driver acpi_pci_hp_driver = {
  */
 int __init acpiphp_glue_init(void)
 {
-	int num = 0;
-
-	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-			ACPI_UINT32_MAX, find_root_bridges, NULL, &num, NULL);
-
-	if (num <= 0)
-		return -1;
-	else
-		acpi_pci_register_driver(&acpi_pci_hp_driver);
+	acpi_pci_register_driver(&acpi_pci_hp_driver);
 
 	return 0;
 }
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 06/11] PCI, ACPI: Make acpi_pci_root_remove remove pci root bus too
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (4 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 05/11] PCI, acpiphp: Separate out hot-add support of pci host bridge Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 07/11] PCI, ACPI: Add pci_root_hp hot removal notification support Yinghai Lu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu, Len Brown

It will call new added pci_stop_and_remove_bus() to stop/remove pci root bus.

Also checking if that pci_root_bus get removed already in bus remove in /sys

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
 drivers/acpi/pci_root.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index ec54014..12791fd 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -645,10 +645,24 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
 {
 	struct acpi_pci_root *root = acpi_driver_data(device);
 
+	/* that root bus could be removed already */
+	if (!pci_find_bus(root->segment, root->secondary.start)) {
+		dev_printk(KERN_DEBUG, &device->dev,
+		  "freeing acpi_pci_root, but pci root bus was removed before");
+		goto out;
+	}
+
 	device_set_run_wake(root->bus->bridge, false);
 	pci_acpi_remove_bus_pm_notifier(device);
 
+	dev_printk(KERN_DEBUG, &device->dev,
+		"freeing acpi_pci_root, will remove pci root bus at first");
+	pci_stop_and_remove_bus(root->bus);
+
+out:
+	list_del(&root->node);
 	kfree(root);
+
 	return 0;
 }
 
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 07/11] PCI, ACPI: Add pci_root_hp hot removal notification support.
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (5 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 06/11] PCI, ACPI: Make acpi_pci_root_remove remove pci root bus too Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 08/11] PCI, ACPI: Add alloc_acpi_hp_work() Yinghai Lu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu, Len Brown

Add missing hot_remove support for root device.

How to use it?
Find out root bus number to acpi root name mapping from dmesg or /sys

  echo "\_SB.PCIB 3" > /proc/acpi/sci/notify
to remove root bus

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
 drivers/acpi/pci_root_hp.c |   61 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/pci_root_hp.c b/drivers/acpi/pci_root_hp.c
index e07c31b..214adcb 100644
--- a/drivers/acpi/pci_root_hp.c
+++ b/drivers/acpi/pci_root_hp.c
@@ -73,6 +73,12 @@ static void add_acpi_root_bridge(acpi_handle handle)
 	list_add(&bridge->list, &acpi_root_bridge_list);
 }
 
+static void remove_acpi_root_bridge(struct acpi_root_bridge *bridge)
+{
+	list_del(&bridge->list);
+	kfree(bridge);
+}
+
 struct acpi_root_hp_work {
 	struct work_struct work;
 	acpi_handle handle;
@@ -143,6 +149,55 @@ static void handle_root_bridge_insertion(acpi_handle handle)
 		printk(KERN_ERR "cannot start bridge\n");
 }
 
+static int acpi_root_evaluate_object(acpi_handle handle, char *cmd, int val)
+{
+	acpi_status status;
+	struct acpi_object_list arg_list;
+	union acpi_object arg;
+
+	arg_list.count = 1;
+	arg_list.pointer = &arg;
+	arg.type = ACPI_TYPE_INTEGER;
+	arg.integer.value = val;
+
+	status = acpi_evaluate_object(handle, cmd, &arg_list, NULL);
+	if (ACPI_FAILURE(status)) {
+		printk(KERN_WARNING "%s: %s to %d failed\n",
+				 __func__, cmd, val);
+		return -1;
+	}
+
+	return 0;
+}
+
+static void handle_root_bridge_removal(acpi_handle handle,
+		 struct acpi_root_bridge *bridge)
+{
+	u32 flags = 0;
+	struct acpi_device *device;
+
+	if (bridge) {
+		flags = bridge->flags;
+		remove_acpi_root_bridge(bridge);
+	}
+
+	if (!acpi_bus_get_device(handle, &device)) {
+		int ret_val = acpi_bus_trim(device, 1);
+
+		printk(KERN_DEBUG "acpi_bus_trim return %x\n", ret_val);
+	}
+
+	if (flags & ROOT_BRIDGE_HAS_PS3) {
+		acpi_status status;
+
+		status = acpi_evaluate_object(handle, "_PS3", NULL, NULL);
+		if (ACPI_FAILURE(status))
+			printk(KERN_WARNING "%s: _PS3 failed\n", __func__);
+	}
+	if (flags & ROOT_BRIDGE_HAS_EJ0)
+		acpi_root_evaluate_object(handle, "_EJ0", 1);
+}
+
 static void _handle_hotplug_event_root(struct work_struct *work)
 {
 	struct acpi_root_bridge *bridge;
@@ -183,6 +238,12 @@ static void _handle_hotplug_event_root(struct work_struct *work)
 		}
 		break;
 
+	case ACPI_NOTIFY_EJECT_REQUEST:
+		/* request device eject */
+		printk(KERN_DEBUG "%s: Device eject notify on %s\n", __func__,
+				 objname);
+		handle_root_bridge_removal(handle, bridge);
+		break;
 	default:
 		printk(KERN_WARNING "notify_handler: unknown event type 0x%x for %s\n",
 				 type, objname);
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 08/11] PCI, ACPI: Add alloc_acpi_hp_work()
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (6 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 07/11] PCI, ACPI: Add pci_root_hp hot removal notification support Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 09/11] PCI, acpiphp: Use acpi_hp_work Yinghai Lu
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu, Len Brown

Will use it with acpiphp and pci_root_hp events handling

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
 drivers/acpi/osl.c      |   21 +++++++++++++++++++++
 include/acpi/acpiosxf.h |    9 +++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 9eaf708..0719fa7 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1592,3 +1592,24 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
 {
 	__acpi_os_prepare_sleep = func;
 }
+
+void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context,
+			void (*func)(struct work_struct *work))
+{
+	struct acpi_hp_work *hp_work;
+	int ret;
+
+	hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
+	if (!hp_work)
+		return;
+
+	hp_work->handle = handle;
+	hp_work->type = type;
+	hp_work->context = context;
+
+	INIT_WORK(&hp_work->work, func);
+	ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
+	if (!ret)
+		kfree(hp_work);
+}
+EXPORT_SYMBOL(alloc_acpi_hp_work);
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 0650f5f..6ff92ea 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -196,6 +196,15 @@ void acpi_os_fixed_event_count(u32 fixed_event_number);
  */
 extern struct workqueue_struct *kacpi_hotplug_wq;
 
+struct acpi_hp_work {
+	struct work_struct work;
+	acpi_handle handle;
+	u32 type;
+	void *context;
+};
+void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context,
+			void (*func)(struct work_struct *work));
+
 acpi_thread_id acpi_os_get_thread_id(void);
 
 acpi_status
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 09/11] PCI, acpiphp: Use acpi_hp_work
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (7 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 08/11] PCI, ACPI: Add alloc_acpi_hp_work() Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 10/11] PCI, pci_root_hp: " Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 11/11] PCI, ACPI: Make kacpi_hotplug_wq static Yinghai Lu
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu, Len Brown

Remove local defined acpiphp_hp_work.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
 drivers/pci/hotplug/acpiphp_glue.c |   42 +++++------------------------------
 1 files changed, 6 insertions(+), 36 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index dc54d57..a4c5a81 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -1193,34 +1193,6 @@ check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
 	return AE_OK ;
 }
 
-struct acpiphp_hp_work {
-	struct work_struct work;
-	acpi_handle handle;
-	u32 type;
-	void *context;
-};
-
-static void alloc_acpiphp_hp_work(acpi_handle handle, u32 type,
-				  void *context,
-				  void (*func)(struct work_struct *work))
-{
-	struct acpiphp_hp_work *hp_work;
-	int ret;
-
-	hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
-	if (!hp_work)
-		return;
-
-	hp_work->handle = handle;
-	hp_work->type = type;
-	hp_work->context = context;
-
-	INIT_WORK(&hp_work->work, func);
-	ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
-	if (!ret)
-		kfree(hp_work);
-}
-
 static void _handle_hotplug_event_bridge(struct work_struct *work)
 {
 	struct acpiphp_bridge *bridge;
@@ -1229,11 +1201,11 @@ static void _handle_hotplug_event_bridge(struct work_struct *work)
 				      .pointer = objname };
 	struct acpi_device *device;
 	int num_sub_bridges = 0;
-	struct acpiphp_hp_work *hp_work;
+	struct acpi_hp_work *hp_work;
 	acpi_handle handle;
 	u32 type;
 
-	hp_work = container_of(work, struct acpiphp_hp_work, work);
+	hp_work = container_of(work, struct acpi_hp_work, work);
 	handle = hp_work->handle;
 	type = hp_work->type;
 
@@ -1336,8 +1308,7 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type,
 	 * For now just re-add this work to the kacpi_hotplug_wq so we
 	 * don't deadlock on hotplug actions.
 	 */
-	alloc_acpiphp_hp_work(handle, type, context,
-			      _handle_hotplug_event_bridge);
+	alloc_acpi_hp_work(handle, type, context, _handle_hotplug_event_bridge);
 }
 
 static void _handle_hotplug_event_func(struct work_struct *work)
@@ -1346,12 +1317,12 @@ static void _handle_hotplug_event_func(struct work_struct *work)
 	char objname[64];
 	struct acpi_buffer buffer = { .length = sizeof(objname),
 				      .pointer = objname };
-	struct acpiphp_hp_work *hp_work;
+	struct acpi_hp_work *hp_work;
 	acpi_handle handle;
 	u32 type;
 	void *context;
 
-	hp_work = container_of(work, struct acpiphp_hp_work, work);
+	hp_work = container_of(work, struct acpi_hp_work, work);
 	handle = hp_work->handle;
 	type = hp_work->type;
 	context = hp_work->context;
@@ -1412,8 +1383,7 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type,
 	 * For now just re-add this work to the kacpi_hotplug_wq so we
 	 * don't deadlock on hotplug actions.
 	 */
-	alloc_acpiphp_hp_work(handle, type, context,
-			      _handle_hotplug_event_func);
+	alloc_acpi_hp_work(handle, type, context, _handle_hotplug_event_func);
 }
 
 static struct acpi_pci_driver acpi_pci_hp_driver = {
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 10/11] PCI, pci_root_hp: Use acpi_hp_work
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (8 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 09/11] PCI, acpiphp: Use acpi_hp_work Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  2012-09-02 21:54 ` [PATCH part4 11/11] PCI, ACPI: Make kacpi_hotplug_wq static Yinghai Lu
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu, Len Brown

Remove local copy: acpi_root_hp_work

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
 drivers/acpi/pci_root_hp.c |   34 +++-------------------------------
 1 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/drivers/acpi/pci_root_hp.c b/drivers/acpi/pci_root_hp.c
index 214adcb..d2ace81 100644
--- a/drivers/acpi/pci_root_hp.c
+++ b/drivers/acpi/pci_root_hp.c
@@ -79,34 +79,6 @@ static void remove_acpi_root_bridge(struct acpi_root_bridge *bridge)
 	kfree(bridge);
 }
 
-struct acpi_root_hp_work {
-	struct work_struct work;
-	acpi_handle handle;
-	u32 type;
-	void *context;
-};
-
-static void alloc_acpi_root_hp_work(acpi_handle handle, u32 type,
-					void *context,
-					void (*func)(struct work_struct *work))
-{
-	struct acpi_root_hp_work *hp_work;
-	int ret;
-
-	hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
-	if (!hp_work)
-		return;
-
-	hp_work->handle = handle;
-	hp_work->type = type;
-	hp_work->context = context;
-
-	INIT_WORK(&hp_work->work, func);
-	ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
-	if (!ret)
-		kfree(hp_work);
-}
-
 /* Program resources in newly inserted bridge */
 static void acpi_root_configure_bridge(acpi_handle handle)
 {
@@ -204,11 +176,11 @@ static void _handle_hotplug_event_root(struct work_struct *work)
 	char objname[64];
 	struct acpi_buffer buffer = { .length = sizeof(objname),
 				      .pointer = objname };
-	struct acpi_root_hp_work *hp_work;
+	struct acpi_hp_work *hp_work;
 	acpi_handle handle;
 	u32 type;
 
-	hp_work = container_of(work, struct acpi_root_hp_work, work);
+	hp_work = container_of(work, struct acpi_hp_work, work);
 	handle = hp_work->handle;
 	type = hp_work->type;
 
@@ -256,7 +228,7 @@ static void _handle_hotplug_event_root(struct work_struct *work)
 static void handle_hotplug_event_root(acpi_handle handle, u32 type,
 					void *context)
 {
-	alloc_acpi_root_hp_work(handle, type, context,
+	alloc_acpi_hp_work(handle, type, context,
 				_handle_hotplug_event_root);
 }
 
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH part4 11/11] PCI, ACPI: Make kacpi_hotplug_wq static
  2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
                   ` (9 preceding siblings ...)
  2012-09-02 21:54 ` [PATCH part4 10/11] PCI, pci_root_hp: " Yinghai Lu
@ 2012-09-02 21:54 ` Yinghai Lu
  10 siblings, 0 replies; 12+ messages in thread
From: Yinghai Lu @ 2012-09-02 21:54 UTC (permalink / raw)
  To: Bjorn Helgaas, Taku Izumi, Jiang Liu, x86
  Cc: Andrew Morton, Linus Torvalds, Greg Kroah-Hartman, linux-pci,
	linux-kernel, linux-acpi, Yinghai Lu, Len Brown

No external user anymore.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
 drivers/acpi/osl.c      |    3 +--
 include/acpi/acpiosxf.h |    2 --
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 0719fa7..311a921 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -84,8 +84,7 @@ static acpi_osd_handler acpi_irq_handler;
 static void *acpi_irq_context;
 static struct workqueue_struct *kacpid_wq;
 static struct workqueue_struct *kacpi_notify_wq;
-struct workqueue_struct *kacpi_hotplug_wq;
-EXPORT_SYMBOL(kacpi_hotplug_wq);
+static struct workqueue_struct *kacpi_hotplug_wq;
 
 /*
  * This list of permanent mappings is for memory that may be accessed from
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 6ff92ea..9f68f69 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -194,8 +194,6 @@ void acpi_os_fixed_event_count(u32 fixed_event_number);
 /*
  * Threads and Scheduling
  */
-extern struct workqueue_struct *kacpi_hotplug_wq;
-
 struct acpi_hp_work {
 	struct work_struct work;
 	acpi_handle handle;
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-09-02 21:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-02 21:54 [PATCH part4 00/11] PCI, ACPI: pci root bus hotplug support - part4 Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 01/11] PCI: Fix a device reference count leakage issue in pci_dev_present() Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 02/11] PCI: Correctly clean up pci root buses in function pci_remove_bus() Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 03/11] PCI: Add pci_stop_and_remove_bus() Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 04/11] PCI: Fix an access-after-free issue in function pci_stop_and_remove_bus() Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 05/11] PCI, acpiphp: Separate out hot-add support of pci host bridge Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 06/11] PCI, ACPI: Make acpi_pci_root_remove remove pci root bus too Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 07/11] PCI, ACPI: Add pci_root_hp hot removal notification support Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 08/11] PCI, ACPI: Add alloc_acpi_hp_work() Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 09/11] PCI, acpiphp: Use acpi_hp_work Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 10/11] PCI, pci_root_hp: " Yinghai Lu
2012-09-02 21:54 ` [PATCH part4 11/11] PCI, ACPI: Make kacpi_hotplug_wq static Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).