PPC: Fix dcbz for linux-user on 970
PATCH 1/1 PPC: Fix dcbz for linux-user on 970
The default with linux-user for dcbz on 970 is to emulate 32 byte clears. However, redoing the dcbzl support we added a check to not honor the bit in HID5 that sets this.
Remove the #ifdef check on linux user, so that we get 32 byte clears again.
Reported-by Riku Voipio <[email protected]>
Signed-off-by Alexander Graf <[email protected]>
--- target-ppc/mem_helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
target-ppc/mem_helper.c +1 -1
@@ -140,7 +140,7 @@ void helper_dcbz(CPUPPCState *env, target_ulong addr, uint32_t is_dcbzl) {int dcbz_size = env->dcache_line_size; -#if !defined(CONFIG_USER_ONLY ) && defined(TARGET_PPC64 ) +#if defined(TARGET_PPC64 )if (!is_dcbzl && (env->excp_model ==POWERPC_EXCP_970 ) && ((env->spr[SPR_970_HID5 ] >>7 ) &0x3 ) ==1 ) {
Signature · 1 line
1.6.0.2
Quoted 5 lines · Alexander Graf
The default with linux-user for dcbz on 970 is to emulate 32 byte clears. However, redoing the dcbzl support we added a check to not honor the bit in HID5 that sets this.
Remove the #ifdef check on linux user, so that we get 32 byte clears again.
This fixes ppc64-linux-user for my smoke tests, thanks.
Tested-by <[email protected]>
Quoted 21 lines
Reported-by Riku Voipio <[email protected]>Signed-off-by Alexander Graf <[email protected]>--- target-ppc/mem_helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)target-ppc/mem_helper.c +1
-1@@ -140,7 +140,7 @@ void helper_dcbz(CPUPPCState *env, target_ulong addr, uint32_t is_dcbzl) {int dcbz_size = env->dcache_line_size; -#if !defined(CONFIG_USER_ONLY ) && defined(TARGET_PPC64 ) +#if defined(TARGET_PPC64 )if (!is_dcbzl && (env->excp_model ==POWERPC_EXCP_970 ) && ((env->spr[SPR_970_HID5 ] >>7 ) &0x3 ) ==1 ) {Signature · 1 line
1.6.0.2