aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2013-06-25 03:47:57 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-06-30 21:49:47 -0400
commitb14b6260efeee6eb8942c6e6420e31281892acb6 (patch)
treec56aa6c55b28a16c3e9c15a85715a8529e0bfb43 /arch/powerpc/kernel/traps.c
parent021424a1fce335e05807fd770eb8e1da30a63eea (diff)
powerpc: Wire up the HV facility unavailable exception
Similar to the facility unavailble exception, except the facilities are controlled by HFSCR. Adapt the facility_unavailable_exception() so it can be called for either the regular or Hypervisor facility unavailable exceptions. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> CC: <stable@vger.kernel.org> [v3.10] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 11f448812dc1..4a87fcbe3ba9 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -1299,10 +1299,18 @@ void facility_unavailable_exception(struct pt_regs *regs)
1299 "EBB", 1299 "EBB",
1300 "TAR", 1300 "TAR",
1301 }; 1301 };
1302 char *facility; 1302 char *facility, *prefix;
1303 u64 value; 1303 u64 value;
1304 1304
1305 value = mfspr(SPRN_FSCR) >> 56; 1305 if (regs->trap == 0xf60) {
1306 value = mfspr(SPRN_FSCR);
1307 prefix = "";
1308 } else {
1309 value = mfspr(SPRN_HFSCR);
1310 prefix = "Hypervisor ";
1311 }
1312
1313 value = value >> 56;
1306 1314
1307 /* We restore the interrupt state now */ 1315 /* We restore the interrupt state now */
1308 if (!arch_irq_disabled_regs(regs)) 1316 if (!arch_irq_disabled_regs(regs))
@@ -1313,8 +1321,8 @@ void facility_unavailable_exception(struct pt_regs *regs)
1313 else 1321 else
1314 facility = "unknown"; 1322 facility = "unknown";
1315 1323
1316 pr_err("Facility '%s' unavailable, exception at 0x%lx, MSR=%lx\n", 1324 pr_err("%sFacility '%s' unavailable, exception at 0x%lx, MSR=%lx\n",
1317 facility, regs->nip, regs->msr); 1325 prefix, facility, regs->nip, regs->msr);
1318 1326
1319 if (user_mode(regs)) { 1327 if (user_mode(regs)) {
1320 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); 1328 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);