diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2011-11-07 06:56:50 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-12-05 13:21:47 -0500 |
commit | 486b10b9f43500741cd63a878d0ef23cd87fc66d (patch) | |
tree | 34128b942b9a5e2943e6f9082e687a3465cd4d47 /drivers/pci | |
parent | 027e8d52abdd44bc00e405af83cd2fbfb96c0824 (diff) |
PCI: pciehp: Handle push button event asynchronously
Use non-ordered workqueue for attention button events.
Attention button events on each slot can be handled asynchronously. So
we should use non-ordered workqueue. This patch also removes ordered
workqueue in pciehp as a result.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 9 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_ctrl.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 1 |
4 files changed, 2 insertions, 13 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 838f571027b7..9a33fdde2d16 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -45,7 +45,6 @@ extern int pciehp_poll_time; | |||
45 | extern int pciehp_debug; | 45 | extern int pciehp_debug; |
46 | extern int pciehp_force; | 46 | extern int pciehp_force; |
47 | extern struct workqueue_struct *pciehp_wq; | 47 | extern struct workqueue_struct *pciehp_wq; |
48 | extern struct workqueue_struct *pciehp_ordered_wq; | ||
49 | 48 | ||
50 | #define dbg(format, arg...) \ | 49 | #define dbg(format, arg...) \ |
51 | do { \ | 50 | do { \ |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index a13ad1308adb..b8c99d35ac97 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
@@ -43,7 +43,6 @@ int pciehp_poll_mode; | |||
43 | int pciehp_poll_time; | 43 | int pciehp_poll_time; |
44 | int pciehp_force; | 44 | int pciehp_force; |
45 | struct workqueue_struct *pciehp_wq; | 45 | struct workqueue_struct *pciehp_wq; |
46 | struct workqueue_struct *pciehp_ordered_wq; | ||
47 | 46 | ||
48 | #define DRIVER_VERSION "0.4" | 47 | #define DRIVER_VERSION "0.4" |
49 | #define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>" | 48 | #define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>" |
@@ -345,18 +344,11 @@ static int __init pcied_init(void) | |||
345 | if (!pciehp_wq) | 344 | if (!pciehp_wq) |
346 | return -ENOMEM; | 345 | return -ENOMEM; |
347 | 346 | ||
348 | pciehp_ordered_wq = alloc_ordered_workqueue("pciehp_ordered", 0); | ||
349 | if (!pciehp_ordered_wq) { | ||
350 | destroy_workqueue(pciehp_wq); | ||
351 | return -ENOMEM; | ||
352 | } | ||
353 | |||
354 | pciehp_firmware_init(); | 347 | pciehp_firmware_init(); |
355 | retval = pcie_port_service_register(&hpdriver_portdrv); | 348 | retval = pcie_port_service_register(&hpdriver_portdrv); |
356 | dbg("pcie_port_service_register = %d\n", retval); | 349 | dbg("pcie_port_service_register = %d\n", retval); |
357 | info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); | 350 | info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); |
358 | if (retval) { | 351 | if (retval) { |
359 | destroy_workqueue(pciehp_ordered_wq); | ||
360 | destroy_workqueue(pciehp_wq); | 352 | destroy_workqueue(pciehp_wq); |
361 | dbg("Failure to register service\n"); | 353 | dbg("Failure to register service\n"); |
362 | } | 354 | } |
@@ -367,7 +359,6 @@ static void __exit pcied_cleanup(void) | |||
367 | { | 359 | { |
368 | dbg("unload_pciehpd()\n"); | 360 | dbg("unload_pciehpd()\n"); |
369 | pcie_port_service_unregister(&hpdriver_portdrv); | 361 | pcie_port_service_unregister(&hpdriver_portdrv); |
370 | destroy_workqueue(pciehp_ordered_wq); | ||
371 | destroy_workqueue(pciehp_wq); | 362 | destroy_workqueue(pciehp_wq); |
372 | info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); | 363 | info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); |
373 | } | 364 | } |
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 085dbb5fc168..27f44295a657 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -344,7 +344,7 @@ void pciehp_queue_pushbutton_work(struct work_struct *work) | |||
344 | kfree(info); | 344 | kfree(info); |
345 | goto out; | 345 | goto out; |
346 | } | 346 | } |
347 | queue_work(pciehp_ordered_wq, &info->work); | 347 | queue_work(pciehp_wq, &info->work); |
348 | out: | 348 | out: |
349 | mutex_unlock(&p_slot->lock); | 349 | mutex_unlock(&p_slot->lock); |
350 | } | 350 | } |
@@ -439,7 +439,7 @@ static void handle_surprise_event(struct slot *p_slot) | |||
439 | else | 439 | else |
440 | p_slot->state = POWERON_STATE; | 440 | p_slot->state = POWERON_STATE; |
441 | 441 | ||
442 | queue_work(pciehp_ordered_wq, &info->work); | 442 | queue_work(pciehp_wq, &info->work); |
443 | } | 443 | } |
444 | 444 | ||
445 | static void interrupt_event_handler(struct work_struct *work) | 445 | static void interrupt_event_handler(struct work_struct *work) |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 7b1414810ae3..bcdbb1643621 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -806,7 +806,6 @@ static void pcie_cleanup_slot(struct controller *ctrl) | |||
806 | struct slot *slot = ctrl->slot; | 806 | struct slot *slot = ctrl->slot; |
807 | cancel_delayed_work(&slot->work); | 807 | cancel_delayed_work(&slot->work); |
808 | flush_workqueue(pciehp_wq); | 808 | flush_workqueue(pciehp_wq); |
809 | flush_workqueue(pciehp_ordered_wq); | ||
810 | kfree(slot); | 809 | kfree(slot); |
811 | } | 810 | } |
812 | 811 | ||