summaryrefslogtreecommitdiffstats
path: root/target-ppc/misc_helper.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2016-07-27 08:56:36 +0200
committerDavid Gibson2016-09-07 04:40:10 +0200
commit57a2988b6f750548052254c20796be6d87d2ab9f (patch)
tree489168b229756b277aac90396eef5e37065929c9 /target-ppc/misc_helper.c
parentppc: Don't update NIP in DCR access routines (diff)
downloadqemu-57a2988b6f750548052254c20796be6d87d2ab9f.tar.gz
qemu-57a2988b6f750548052254c20796be6d87d2ab9f.tar.xz
qemu-57a2988b6f750548052254c20796be6d87d2ab9f.zip
ppc: Don't update NIP in facility unavailable interrupts
This is no longer necessary as the helpers will properly retrieve the return address when needed. Also remove gen_update_current_nip() which didn't seem to make much sense to me. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-ppc/misc_helper.c')
-rw-r--r--target-ppc/misc_helper.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target-ppc/misc_helper.c b/target-ppc/misc_helper.c
index cb5ebf56cf..1e6e705a4e 100644
--- a/target-ppc/misc_helper.c
+++ b/target-ppc/misc_helper.c
@@ -39,7 +39,8 @@ void helper_store_dump_spr(CPUPPCState *env, uint32_t sprn)
#ifdef TARGET_PPC64
static void raise_fu_exception(CPUPPCState *env, uint32_t bit,
- uint32_t sprn, uint32_t cause)
+ uint32_t sprn, uint32_t cause,
+ uintptr_t raddr)
{
qemu_log("Facility SPR %d is unavailable (SPR FSCR:%d)\n", sprn, bit);
@@ -47,7 +48,7 @@ static void raise_fu_exception(CPUPPCState *env, uint32_t bit,
cause &= FSCR_IC_MASK;
env->spr[SPR_FSCR] |= (target_ulong)cause << FSCR_IC_POS;
- helper_raise_exception_err(env, POWERPC_EXCP_FU, 0);
+ raise_exception_err_ra(env, POWERPC_EXCP_FU, 0, raddr);
}
#endif
@@ -59,7 +60,7 @@ void helper_fscr_facility_check(CPUPPCState *env, uint32_t bit,
/* Facility is enabled, continue */
return;
}
- raise_fu_exception(env, bit, sprn, cause);
+ raise_fu_exception(env, bit, sprn, cause, GETPC());
#endif
}
@@ -71,7 +72,7 @@ void helper_msr_facility_check(CPUPPCState *env, uint32_t bit,
/* Facility is enabled, continue */
return;
}
- raise_fu_exception(env, bit, sprn, cause);
+ raise_fu_exception(env, bit, sprn, cause, GETPC());
#endif
}