diff options
Diffstat (limited to 'target-ppc/mmu-hash32.h')
-rw-r--r-- | target-ppc/mmu-hash32.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/target-ppc/mmu-hash32.h b/target-ppc/mmu-hash32.h index 4671141a32..e193a6d0d1 100644 --- a/target-ppc/mmu-hash32.h +++ b/target-ppc/mmu-hash32.h @@ -68,7 +68,8 @@ int ppc_hash32_handle_mmu_fault(CPUPPCState *env, target_ulong address, int rw, static inline target_ulong ppc_hash32_load_hpte0(CPUPPCState *env, hwaddr pte_offset) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(ppc_env_get_cpu(env)); + assert(!env->external_htab); /* Not supported on 32-bit for now */ return ldl_phys(cs->as, env->htab_base + pte_offset); } @@ -76,7 +77,8 @@ static inline target_ulong ppc_hash32_load_hpte0(CPUPPCState *env, static inline target_ulong ppc_hash32_load_hpte1(CPUPPCState *env, hwaddr pte_offset) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(ppc_env_get_cpu(env)); + assert(!env->external_htab); /* Not supported on 32-bit for now */ return ldl_phys(cs->as, env->htab_base + pte_offset + HASH_PTE_SIZE_32/2); } @@ -84,7 +86,8 @@ static inline target_ulong ppc_hash32_load_hpte1(CPUPPCState *env, static inline void ppc_hash32_store_hpte0(CPUPPCState *env, hwaddr pte_offset, target_ulong pte0) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(ppc_env_get_cpu(env)); + assert(!env->external_htab); /* Not supported on 32-bit for now */ stl_phys(cs->as, env->htab_base + pte_offset, pte0); } @@ -92,7 +95,8 @@ static inline void ppc_hash32_store_hpte0(CPUPPCState *env, static inline void ppc_hash32_store_hpte1(CPUPPCState *env, hwaddr pte_offset, target_ulong pte1) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(ppc_env_get_cpu(env)); + assert(!env->external_htab); /* Not supported on 32-bit for now */ stl_phys(cs->as, env->htab_base + pte_offset + HASH_PTE_SIZE_32/2, pte1); } |