aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2004-08-22 22:31:08 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:31:08 -0700
commit3c09bf53a57752b99ad2934a5126c6dc1513c371 (patch)
treeafcf87270a4a4f81140a3923029a38fb61ac0a04 /arch
parentc52f92f1a0843eecfe30348ebc268d696738ac54 (diff)
downloadhistory-3c09bf53a57752b99ad2934a5126c6dc1513c371.tar.gz
[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: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/kernel/traps.c7
-rw-r--r--arch/ppc64/oprofile/common.c7
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
index a86acbd766d9c4..f0d67632dcd871 100644
--- a/arch/ppc64/kernel/traps.c
+++ b/arch/ppc64/kernel/traps.c
@@ -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;
diff --git a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c
index b3761c922eaeff..a956638eb5ebfe 100644
--- a/arch/ppc64/oprofile/common.c
+++ b/arch/ppc64/oprofile/common.c
@@ -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)