Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Johannes Berg and committed by
Paul Mackerras
67b60518 a792e75d

+3 -7
+3 -7
drivers/macintosh/windfarm_core.c
··· 94 94 DBG("wf: thread started\n"); 95 95 96 96 set_freezable(); 97 - while(!kthread_should_stop()) { 97 + while (!kthread_should_stop()) { 98 + try_to_freeze(); 99 + 98 100 if (time_after_eq(jiffies, next)) { 99 101 wf_notify(WF_EVENT_TICK, NULL); 100 102 if (wf_overtemp) { ··· 118 116 delay = next - jiffies; 119 117 if (delay <= HZ) 120 118 schedule_timeout_interruptible(delay); 121 - 122 - /* there should be no non-suspend signal, but oh well */ 123 - if (signal_pending(current) && !try_to_freeze()) { 124 - printk(KERN_WARNING "windfarm: thread got sigl !\n"); 125 - break; 126 - } 127 119 } 128 120 129 121 DBG("wf: thread stopped\n");