aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-11-07 05:18:02 -0500
committerPaul Mackerras <paulus@samba.org>2007-11-07 22:15:34 -0500
commit67b60518b0ff5cd666c7650eb09f0ef41f838106 (patch)
treeb30d319435be205f2ccc4e79eaec531341ce00d7 /drivers/macintosh
parenta792e75d9b3dec3fc1dfef4a8c40674bbba44641 (diff)
[POWERPC] windfarm: Fix windfarm thread freezer interaction
When I fixed the windfarm freezer interaction first in commit 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21, an earlier patch than the one I came up with after comments was committed. This has come back to haunt us now because commit d5d8c5976d6adeddb8208c240460411e2198b393 changed the freezer to no long send signals. Fix it by removing the windfarm thread's signal logic and restoring the original try_to_freeze(). We could simply revert 1ed2ddf380e19dafeec2150ca709ef7f4a67cd21 now but I feel that the assertion that no signal is delivered to the windfarm thread needs not be there. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/windfarm_core.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 516d943227e2..075b4d99e354 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -94,7 +94,9 @@ static int wf_thread_func(void *data)
94 DBG("wf: thread started\n"); 94 DBG("wf: thread started\n");
95 95
96 set_freezable(); 96 set_freezable();
97 while(!kthread_should_stop()) { 97 while (!kthread_should_stop()) {
98 try_to_freeze();
99
98 if (time_after_eq(jiffies, next)) { 100 if (time_after_eq(jiffies, next)) {
99 wf_notify(WF_EVENT_TICK, NULL); 101 wf_notify(WF_EVENT_TICK, NULL);
100 if (wf_overtemp) { 102 if (wf_overtemp) {
@@ -116,12 +118,6 @@ static int wf_thread_func(void *data)
116 delay = next - jiffies; 118 delay = next - jiffies;
117 if (delay <= HZ) 119 if (delay <= HZ)
118 schedule_timeout_interruptible(delay); 120 schedule_timeout_interruptible(delay);
119
120 /* there should be no non-suspend signal, but oh well */
121 if (signal_pending(current) && !try_to_freeze()) {
122 printk(KERN_WARNING "windfarm: thread got sigl !\n");
123 break;
124 }
125 } 121 }
126 122
127 DBG("wf: thread stopped\n"); 123 DBG("wf: thread stopped\n");