forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/tj/wq * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: remove in_workqueue_context() workqueue: Clarify that schedule_on_each_cpu is synchronous memory_hotplug: drop spurious calls to flush_scheduled_work() shpchp: update workqueue usage pciehp: update workqueue usage isdn/eicon: don't call flush_scheduled_work() from diva_os_remove_soft_isr() workqueue: add and use WQ_MEM_RECLAIM flag workqueue: fix HIGHPRI handling in keep_working() workqueue: add queue_work and activate_work trace points workqueue: prepare for more tracepoints workqueue: implement flush[_delayed]_work_sync() workqueue: factor out start_flush_work() workqueue: cleanup flush/cancel functions workqueue: implement alloc_ordered_workqueue() Fix up trivial conflict in fs/gfs2/main.c as per Tejun
- Loading branch information
Showing
17 changed files
with
363 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ int pciehp_poll_mode; | |
int pciehp_poll_time; | ||
int pciehp_force; | ||
struct workqueue_struct *pciehp_wq; | ||
struct workqueue_struct *pciehp_ordered_wq; | ||
|
||
#define DRIVER_VERSION "0.4" | ||
#define DRIVER_AUTHOR "Dan Zink <[email protected]>, Greg Kroah-Hartman <[email protected]>, Dely Sy <[email protected]>" | ||
|
@@ -340,18 +341,33 @@ static int __init pcied_init(void) | |
{ | ||
int retval = 0; | ||
|
||
pciehp_wq = alloc_workqueue("pciehp", 0, 0); | ||
if (!pciehp_wq) | ||
return -ENOMEM; | ||
|
||
pciehp_ordered_wq = alloc_ordered_workqueue("pciehp_ordered", 0); | ||
if (!pciehp_ordered_wq) { | ||
destroy_workqueue(pciehp_wq); | ||
return -ENOMEM; | ||
} | ||
|
||
pciehp_firmware_init(); | ||
retval = pcie_port_service_register(&hpdriver_portdrv); | ||
dbg("pcie_port_service_register = %d\n", retval); | ||
info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); | ||
if (retval) | ||
if (retval) { | ||
destroy_workqueue(pciehp_ordered_wq); | ||
destroy_workqueue(pciehp_wq); | ||
dbg("Failure to register service\n"); | ||
} | ||
return retval; | ||
} | ||
|
||
static void __exit pcied_cleanup(void) | ||
{ | ||
dbg("unload_pciehpd()\n"); | ||
destroy_workqueue(pciehp_ordered_wq); | ||
destroy_workqueue(pciehp_wq); | ||
pcie_port_service_unregister(&hpdriver_portdrv); | ||
info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,14 +33,14 @@ | |
#include <linux/types.h> | ||
#include <linux/slab.h> | ||
#include <linux/pci.h> | ||
#include <linux/workqueue.h> | ||
#include "shpchp.h" | ||
|
||
/* Global variables */ | ||
int shpchp_debug; | ||
int shpchp_poll_mode; | ||
int shpchp_poll_time; | ||
struct workqueue_struct *shpchp_wq; | ||
struct workqueue_struct *shpchp_ordered_wq; | ||
|
||
#define DRIVER_VERSION "0.4" | ||
#define DRIVER_AUTHOR "Dan Zink <[email protected]>, Greg Kroah-Hartman <[email protected]>, Dely Sy <[email protected]>" | ||
|
@@ -174,8 +174,8 @@ void cleanup_slots(struct controller *ctrl) | |
slot = list_entry(tmp, struct slot, slot_list); | ||
list_del(&slot->slot_list); | ||
cancel_delayed_work(&slot->work); | ||
flush_scheduled_work(); | ||
flush_workqueue(shpchp_wq); | ||
flush_workqueue(shpchp_ordered_wq); | ||
pci_hp_deregister(slot->hotplug_slot); | ||
} | ||
} | ||
|
@@ -360,16 +360,32 @@ static int __init shpcd_init(void) | |
{ | ||
int retval = 0; | ||
|
||
shpchp_wq = alloc_ordered_workqueue("shpchp", 0); | ||
if (!shpchp_wq) | ||
return -ENOMEM; | ||
|
||
shpchp_ordered_wq = alloc_ordered_workqueue("shpchp_ordered", 0); | ||
if (!shpchp_ordered_wq) { | ||
destroy_workqueue(shpchp_wq); | ||
return -ENOMEM; | ||
} | ||
|
||
retval = pci_register_driver(&shpc_driver); | ||
dbg("%s: pci_register_driver = %d\n", __func__, retval); | ||
info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); | ||
if (retval) { | ||
destroy_workqueue(shpchp_ordered_wq); | ||
destroy_workqueue(shpchp_wq); | ||
} | ||
return retval; | ||
} | ||
|
||
static void __exit shpcd_cleanup(void) | ||
{ | ||
dbg("unload_shpchpd()\n"); | ||
pci_unregister_driver(&shpc_driver); | ||
destroy_workqueue(shpchp_ordered_wq); | ||
destroy_workqueue(shpchp_wq); | ||
info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.