aboutsummaryrefslogtreecommitdiff
path: root/hw/alpha_palcode.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-12 21:33:22 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-12 21:33:22 +0000
commitf48c144e2481e94eba625fd637f5161d090535e5 (patch)
treefe9b95f1a473bf672e35541987e99b0929340081 /hw/alpha_palcode.c
parent932e71cd57bab4e6206e1355c6425290721bbe34 (diff)
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
Diffstat (limited to 'hw/alpha_palcode.c')
-rw-r--r--hw/alpha_palcode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/alpha_palcode.c b/hw/alpha_palcode.c
index 70d4af6b2a..151f3c2ab5 100644
--- a/hw/alpha_palcode.c
+++ b/hw/alpha_palcode.c
@@ -998,12 +998,12 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw,
uint64_t physical, page_size, end;
int prot, zbits, ret;
- if (env->user_mode_only) {
+#if defined(CONFIG_USER_ONLY)
ret = 2;
- } else {
+#else
ret = virtual_to_physical(env, &physical, &zbits, &prot,
address, mmu_idx, rw);
- }
+#endif
switch (ret) {
case 0:
/* No fault */