[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>
This commit is contained in:
Benjamin Herrenschmidt
2005-06-27 14:36:32 -07:00
committed by Linus Torvalds
parent bb16574681
commit e4ee69c8c1
3 changed files with 35 additions and 7 deletions

View File

@@ -63,6 +63,10 @@
#include <asm/backlight.h>
#endif
#ifdef CONFIG_PPC32
#include <asm/open_pic.h>
#endif
/* Some compile options */
#undef SUSPEND_USES_PMU
#define DEBUG_SLEEP
@@ -407,6 +411,12 @@ static int __init via_pmu_start(void)
batt_req.complete = 1;
#endif
#ifdef CONFIG_PPC32
if (pmu_kind == PMU_KEYLARGO_BASED)
openpic_set_irq_priority(vias->intrs[0].line,
OPENPIC_PRIORITY_DEFAULT + 1);
#endif
if (request_irq(vias->intrs[0].line, via_pmu_interrupt, 0, "VIA-PMU",
(void *)0)) {
printk(KERN_ERR "VIA-PMU: can't get irq %d\n",