Commit 3c09bf53 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: allow oprofile module to be safely unloaded

Allow the oprofile module to be unloaded, before we never removed the
oprofile specific interrupt handler.  Handle the pending exception case in
the dummy interrupt handler instead.
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 c52f92f1
......@@ -520,8 +520,15 @@ void AltivecUnavailableException(struct pt_regs *regs)
die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);
}
/* Ensure exceptions are disabled */
#define MMCR0_PMXE (1UL << (31 - 5))
static void dummy_perf(struct pt_regs *regs)
{
unsigned int mmcr0 = mfspr(SPRN_MMCR0);
mmcr0 &= ~MMCR0_PMXE;
mtspr(SPRN_MMCR0, mmcr0);
}
void (*perf_irq)(struct pt_regs *) = dummy_perf;
......
......@@ -52,17 +52,10 @@ static int op_ppc64_setup(void)
static void op_ppc64_shutdown(void)
{
/*
* We need to be sure we have cleared all pending exceptions before
* removing the interrupt handler. For the moment we play it safe and
* leave it in
*/
#if 0
mb();
/* Remove our interrupt handler. We may be removing this module. */
perf_irq = save_perf_irq;
#endif
}
static void op_ppc64_cpu_start(void *dummy)
......
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