Skip to content

Commit

Permalink
[POWERPC] windfarm: Fix windfarm thread freezer interaction
Browse files Browse the repository at this point in the history
When I fixed the windfarm freezer interaction first in commit
1ed2ddf, an earlier patch than the one
I came up with after comments was committed. This has come back to haunt
us now because commit d5d8c59 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 1ed2ddf 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>
  • Loading branch information
Johannes Berg authored and Paul Mackerras committed Nov 8, 2007
1 parent a792e75 commit 67b6051
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/macintosh/windfarm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ static int wf_thread_func(void *data)
DBG("wf: thread started\n");

set_freezable();
while(!kthread_should_stop()) {
while (!kthread_should_stop()) {
try_to_freeze();

if (time_after_eq(jiffies, next)) {
wf_notify(WF_EVENT_TICK, NULL);
if (wf_overtemp) {
Expand All @@ -116,12 +118,6 @@ static int wf_thread_func(void *data)
delay = next - jiffies;
if (delay <= HZ)
schedule_timeout_interruptible(delay);

/* there should be no non-suspend signal, but oh well */
if (signal_pending(current) && !try_to_freeze()) {
printk(KERN_WARNING "windfarm: thread got sigl !\n");
break;
}
}

DBG("wf: thread stopped\n");
Expand Down

0 comments on commit 67b6051

Please sign in to comment.