diff options
author | Michael Neuling <mikey@neuling.org> | 2013-02-13 16:21:38 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-02-15 17:02:22 +1100 |
commit | d0c0c9a13f682157e8610565b6125a31d24434bc (patch) | |
tree | 2bda07d0384c3a511aabc395658065a61a83a8b9 /arch/powerpc/kernel/traps.c | |
parent | fb09692e71f13af7298eb603a1975850b1c7a8d8 (diff) | |
download | blackbird-op-linux-d0c0c9a13f682157e8610565b6125a31d24434bc.tar.gz blackbird-op-linux-d0c0c9a13f682157e8610565b6125a31d24434bc.zip |
powerpc: Add transactional memory unavaliable execption handler
These should never happen since we always turn on MSR TM when in userspace. We
don't do lazy TM.
Hence if we hit this, we barf and kill the task as something's gone horribly
wrong.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bd5de5deaf51..f829e05d8b1b 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -1168,6 +1168,27 @@ void vsx_unavailable_exception(struct pt_regs *regs) die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); } +void tm_unavailable_exception(struct pt_regs *regs) +{ + /* We restore the interrupt state now */ + if (!arch_irq_disabled_regs(regs)) + local_irq_enable(); + + /* Currently we never expect a TMU exception. Catch + * this and kill the process! + */ + printk(KERN_EMERG "Unexpected TM unavailable exception at %lx " + "(msr %lx)\n", + regs->nip, regs->msr); + + if (user_mode(regs)) { + _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); + return; + } + + die("Unexpected TM unavailable exception", regs, SIGABRT); +} + void performance_monitor_exception(struct pt_regs *regs) { __get_cpu_var(irq_stat).pmu_irqs++; |