summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2004-09-07 17:46:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-07 17:46:36 -0700
commit34201b6e7e90e619f0ab0379cc86d55b41f95e4c (patch)
tree6a0dec1a725f3202e8657061779122dbe4bc1456
parentd5e38721fdf09654e5c89468b20cbd40f745b253 (diff)
[PATCH] ppc64: fix hang on oprofile shutdown
We had a problem in our dummy perfmon handler where we wouldnt reset the PMAO bit. If the bit ended up set and oprofile shutdown and removed its handler then we would end up in a hard loop taking perfmon exceptions. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc64/kernel/traps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
index 49703b94b72a..90700b41438e 100644
--- a/arch/ppc64/kernel/traps.c
+++ b/arch/ppc64/kernel/traps.c
@@ -522,12 +522,13 @@ void AltivecUnavailableException(struct pt_regs *regs)
/* Ensure exceptions are disabled */
#define MMCR0_PMXE (1UL << (31 - 5))
+#define MMCR0_PMAO (1UL << (31 - 24))
static void dummy_perf(struct pt_regs *regs)
{
unsigned int mmcr0 = mfspr(SPRN_MMCR0);
- mmcr0 &= ~MMCR0_PMXE;
+ mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO);
mtspr(SPRN_MMCR0, mmcr0);
}