aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-06-27 17:36:32 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 18:11:42 -0400
commite4ee69c8c1e7ff9790fbce29c7be50db57323a6f (patch)
treeba6bfdc216de500f3b3c7c1613c50efb7d550dba /drivers
parentbb1657468152c5e5232c7bf35cf0e9c41b5d9910 (diff)
[PATCH] ppc32: Bump PMU interrupt priority
The Power Management Unit on PowerMacs is very sensitive to timeouts during async message exchanges. It uses rather crude protocol based on a shift register with an interrupt and is almost continuously exchanging messages with the host CPU on laptops. This patch adds a routine to the open_pic driver to be able to select a PMU driver so that it bumps it's interrupt priority to above the normal level. This will allow PMU interrupts to occur while another interrupt is pending, and thus reduce the risk of machine beeing abruptly shutdown by the PMU due to a timeout in PMU communication caused by excessive interrupt latency. The problem is very rare, and usually just doesn't happen, but it is still useful to make things even more robust. 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 'drivers')
-rw-r--r--drivers/macintosh/via-pmu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index b941ee220997..5375df03c6f3 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -63,6 +63,10 @@
63#include <asm/backlight.h> 63#include <asm/backlight.h>
64#endif 64#endif
65 65
66#ifdef CONFIG_PPC32
67#include <asm/open_pic.h>
68#endif
69
66/* Some compile options */ 70/* Some compile options */
67#undef SUSPEND_USES_PMU 71#undef SUSPEND_USES_PMU
68#define DEBUG_SLEEP 72#define DEBUG_SLEEP
@@ -407,6 +411,12 @@ static int __init via_pmu_start(void)
407 batt_req.complete = 1; 411 batt_req.complete = 1;
408#endif 412#endif
409 413
414#ifdef CONFIG_PPC32
415 if (pmu_kind == PMU_KEYLARGO_BASED)
416 openpic_set_irq_priority(vias->intrs[0].line,
417 OPENPIC_PRIORITY_DEFAULT + 1);
418#endif
419
410 if (request_irq(vias->intrs[0].line, via_pmu_interrupt, 0, "VIA-PMU", 420 if (request_irq(vias->intrs[0].line, via_pmu_interrupt, 0, "VIA-PMU",
411 (void *)0)) { 421 (void *)0)) {
412 printk(KERN_ERR "VIA-PMU: can't get irq %d\n", 422 printk(KERN_ERR "VIA-PMU: can't get irq %d\n",