diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-05-27 15:53:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-28 14:14:01 -0400 |
commit | b16eeb47292597a8bf3ad53fdaf1f727f57bd8e4 (patch) | |
tree | 93325bd2b4dd53e3064408c997f626b565c4423f /arch/ppc/platforms | |
parent | 49f384b82b03416dd7e4fc77847a959fe3247362 (diff) |
[PATCH] ppc32: Fix cpufreq vs. sleep issue
Recent kernels occasionally trigger a PMU timeout on some mac laptops,
typically on wakeup from sleep. This seem to be caused by either a too big
latency caused by the cpufreq switch on wakeup from sleep or by an
interrupt beeing lost due to the reset of the interrupt controller done
during wakeup.
This patch makes that code more robust by stopping PMU auto poll activity
around cpufreq changes on machines that use the PMU for such changes (long
latency switching involving a CPU hard reset and flush of all caches) and
by removing the reset of the open pic interrupt controller on wakeup (that
can cause the loss of an interrupt and Darwin doesn't do it, so it must not
be necessary).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/platforms')
-rw-r--r-- | arch/ppc/platforms/pmac_cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c index 48e482c8bd0d..937f46df711e 100644 --- a/arch/ppc/platforms/pmac_cpufreq.c +++ b/arch/ppc/platforms/pmac_cpufreq.c | |||
@@ -271,6 +271,8 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
271 | #ifdef DEBUG_FREQ | 271 | #ifdef DEBUG_FREQ |
272 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); | 272 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); |
273 | #endif | 273 | #endif |
274 | pmu_suspend(); | ||
275 | |||
274 | /* Disable all interrupt sources on openpic */ | 276 | /* Disable all interrupt sources on openpic */ |
275 | pic_prio = openpic_get_priority(); | 277 | pic_prio = openpic_get_priority(); |
276 | openpic_set_priority(0xf); | 278 | openpic_set_priority(0xf); |
@@ -345,6 +347,8 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
345 | debug_calc_bogomips(); | 347 | debug_calc_bogomips(); |
346 | #endif | 348 | #endif |
347 | 349 | ||
350 | pmu_resume(); | ||
351 | |||
348 | preempt_enable(); | 352 | preempt_enable(); |
349 | 353 | ||
350 | return 0; | 354 | return 0; |