提交 1ed2ddf3 编写于 作者: J Johannes Berg 提交者: Paul Mackerras

[POWERPC] windfarm: don't die on suspend thread signal

When the windfarm thread gets a suspend signal it will die instead of
freezing. This fixes it.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 92d4dda3
...@@ -94,8 +94,6 @@ static int wf_thread_func(void *data) ...@@ -94,8 +94,6 @@ static int wf_thread_func(void *data)
DBG("wf: thread started\n"); DBG("wf: thread started\n");
while(!kthread_should_stop()) { while(!kthread_should_stop()) {
try_to_freeze();
if (time_after_eq(jiffies, next)) { if (time_after_eq(jiffies, next)) {
wf_notify(WF_EVENT_TICK, NULL); wf_notify(WF_EVENT_TICK, NULL);
if (wf_overtemp) { if (wf_overtemp) {
...@@ -118,8 +116,8 @@ static int wf_thread_func(void *data) ...@@ -118,8 +116,8 @@ static int wf_thread_func(void *data)
if (delay <= HZ) if (delay <= HZ)
schedule_timeout_interruptible(delay); schedule_timeout_interruptible(delay);
/* there should be no signal, but oh well */ /* there should be no non-suspend signal, but oh well */
if (signal_pending(current)) { if (signal_pending(current) && !try_to_freeze()) {
printk(KERN_WARNING "windfarm: thread got sigl !\n"); printk(KERN_WARNING "windfarm: thread got sigl !\n");
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册