Commit 34201b6e authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d5e38721
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment