Commit f48c144e2481e94eba625fd637f5161d090535e5
1 parent
932e71cd
target-alpha: get rid of tests on env->user_mode_only
Replace runtime checks on env->user_mode_only by compile time checks on CONFIG_USER_ONLY. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6277 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
3 deletions
hw/alpha_palcode.c
@@ -998,12 +998,12 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, | @@ -998,12 +998,12 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, | ||
998 | uint64_t physical, page_size, end; | 998 | uint64_t physical, page_size, end; |
999 | int prot, zbits, ret; | 999 | int prot, zbits, ret; |
1000 | 1000 | ||
1001 | - if (env->user_mode_only) { | 1001 | +#if defined(CONFIG_USER_ONLY) |
1002 | ret = 2; | 1002 | ret = 2; |
1003 | - } else { | 1003 | +#else |
1004 | ret = virtual_to_physical(env, &physical, &zbits, &prot, | 1004 | ret = virtual_to_physical(env, &physical, &zbits, &prot, |
1005 | address, mmu_idx, rw); | 1005 | address, mmu_idx, rw); |
1006 | - } | 1006 | +#endif |
1007 | switch (ret) { | 1007 | switch (ret) { |
1008 | case 0: | 1008 | case 0: |
1009 | /* No fault */ | 1009 | /* No fault */ |