[PATCH] ppc32: Fix might_sleep() warning with clock spreading
The clock spreading disable/enable code was called to late/early during the suspend/resume code on some laptops and would trigger a might_sleep() warning due to the down() call in the low level i2c code. This fixes it by calling those functions earlier/later when interrupts are still enabled. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
このコミットが含まれているのは:
@@ -2351,6 +2351,10 @@ pmac_suspend_devices(void)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Disable clock spreading on some machines */
|
||||
pmac_tweak_clock_spreading(0);
|
||||
|
||||
/* Stop preemption */
|
||||
preempt_disable();
|
||||
|
||||
/* Make sure the decrementer won't interrupt us */
|
||||
@@ -2417,11 +2421,12 @@ pmac_wakeup_devices(void)
|
||||
|
||||
/* Re-enable local CPU interrupts */
|
||||
local_irq_enable();
|
||||
|
||||
mdelay(100);
|
||||
|
||||
preempt_enable();
|
||||
|
||||
/* Re-enable clock spreading on some machines */
|
||||
pmac_tweak_clock_spreading(1);
|
||||
|
||||
/* Resume devices */
|
||||
device_resume();
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする