diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-06-27 14:36:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 15:11:42 -0700 |
commit | e4ee69c8c1e7ff9790fbce29c7be50db57323a6f (patch) | |
tree | ba6bfdc216de500f3b3c7c1613c50efb7d550dba /drivers/macintosh/via-pmu.c | |
parent | bb1657468152c5e5232c7bf35cf0e9c41b5d9910 (diff) | |
download | kernel_samsung_smdk4412-e4ee69c8c1e7ff9790fbce29c7be50db57323a6f.zip kernel_samsung_smdk4412-e4ee69c8c1e7ff9790fbce29c7be50db57323a6f.tar.gz kernel_samsung_smdk4412-e4ee69c8c1e7ff9790fbce29c7be50db57323a6f.tar.bz2 |
[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/macintosh/via-pmu.c')
-rw-r--r-- | drivers/macintosh/via-pmu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index b941ee2..5375df0 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -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", |