diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2013-06-20 07:21:00 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-20 09:06:01 +0200 |
commit | c86085580d5f60d2d3cea9c60d50e284558d3de7 (patch) | |
tree | 64a22c76cceb3d9c5e458a2d7c114bf40aae7a07 /arch/powerpc/kernel/eeh.c | |
parent | powerpc/eeh: Delay EEH probe during hotplug (diff) | |
download | linux-c86085580d5f60d2d3cea9c60d50e284558d3de7.tar.xz linux-c86085580d5f60d2d3cea9c60d50e284558d3de7.zip |
powerpc/eeh: Single kthread to handle events
We possiblly have multiple kthreads running for multiple EEH errors
(events) and use one spinlock to make the process of handling those
EEH events serialized. That's unnecessary and the patch creates only
one kthread, which is started during EEH core initialization time in
eeh_init(). A new semaphore introduced to count the number of existing
EEH events in the queue and the kthread waiting on the semaphore.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/eeh.c')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 7d169d35b5b0..777ecc06af19 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -704,6 +704,11 @@ int __init eeh_init(void) raw_spin_lock_init(&confirm_error_lock); + /* Initialize EEH event */ + ret = eeh_event_init(); + if (ret) + return ret; + /* Enable EEH for all adapters */ if (eeh_probe_mode_devtree()) { list_for_each_entry_safe(hose, tmp, |