Patchwork [19/33] target-alpha: Use kernel mmu_idx for pal_mode.

login
register
mail settings
Submitter Richard Henderson
Date April 28, 2011, 8:51 p.m.
Message ID <1304023875-25040-20-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/93328/
State New
Headers show

Comments

Richard Henderson - April 28, 2011, 8:51 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-alpha/cpu.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Patch

diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h
index 50a8109..88281bb 100644
--- a/target-alpha/cpu.h
+++ b/target-alpha/cpu.h
@@ -357,7 +357,13 @@  enum {
 
 static inline int cpu_mmu_index (CPUState *env)
 {
-    return (env->ps & PS_USER_MODE) != 0;
+    if (env->pal_mode) {
+        return MMU_KERNEL_IDX;
+    } else if (env->ps & PS_USER_MODE) {
+        return MMU_USER_IDX;
+    } else {
+        return MMU_KERNEL_IDX;
+    }
 }
 
 enum {