aboutsummaryrefslogtreecommitdiff
path: root/target/nios2/mmu.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-03-22 18:44:44 -0700
committerRichard Henderson <richard.henderson@linaro.org>2019-06-10 07:03:42 -0700
commit29168c6585673402e5ff285d84fd1d44de977424 (patch)
treef066622153b729577a75fb19ea7c826016a2b04c /target/nios2/mmu.c
parentf8600ba22188595bca6c098ab66b9641b10bca99 (diff)
downloadqemu-29168c6585673402e5ff285d84fd1d44de977424.zip
qemu-29168c6585673402e5ff285d84fd1d44de977424.tar.gz
qemu-29168c6585673402e5ff285d84fd1d44de977424.tar.bz2
target/nios2: Use env_cpu, env_archcpu
Cleanup in the boilerplate that each target must define. Replace nios2_env_get_cpu with env_archcpu. The combination CPU(nios2_env_get_cpu) should have used ENV_GET_CPU to begin; use env_cpu now. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/nios2/mmu.c')
-rw-r--r--target/nios2/mmu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/target/nios2/mmu.c b/target/nios2/mmu.c
index 53ed641..9a0bafe 100644
--- a/target/nios2/mmu.c
+++ b/target/nios2/mmu.c
@@ -61,7 +61,7 @@ unsigned int mmu_translate(CPUNios2State *env,
Nios2MMULookup *lu,
target_ulong vaddr, int rw, int mmu_idx)
{
- Nios2CPU *cpu = nios2_env_get_cpu(env);
+ Nios2CPU *cpu = env_archcpu(env);
int pid = (env->mmu.tlbmisc_wr & CR_TLBMISC_PID_MASK) >> 4;
int vpn = vaddr >> 12;
@@ -103,7 +103,7 @@ unsigned int mmu_translate(CPUNios2State *env,
static void mmu_flush_pid(CPUNios2State *env, uint32_t pid)
{
CPUState *cs = env_cpu(env);
- Nios2CPU *cpu = nios2_env_get_cpu(env);
+ Nios2CPU *cpu = env_archcpu(env);
int idx;
MMU_LOG(qemu_log("TLB Flush PID %d\n", pid));
@@ -127,7 +127,7 @@ static void mmu_flush_pid(CPUNios2State *env, uint32_t pid)
void mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v)
{
CPUState *cs = env_cpu(env);
- Nios2CPU *cpu = nios2_env_get_cpu(env);
+ Nios2CPU *cpu = env_archcpu(env);
MMU_LOG(qemu_log("mmu_write %08X = %08X\n", rn, v));
@@ -244,7 +244,7 @@ void mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v)
void mmu_init(CPUNios2State *env)
{
- Nios2CPU *cpu = nios2_env_get_cpu(env);
+ Nios2CPU *cpu = env_archcpu(env);
Nios2MMU *mmu = &env->mmu;
MMU_LOG(qemu_log("mmu_init\n"));
@@ -255,7 +255,7 @@ void mmu_init(CPUNios2State *env)
void dump_mmu(CPUNios2State *env)
{
- Nios2CPU *cpu = nios2_env_get_cpu(env);
+ Nios2CPU *cpu = env_archcpu(env);
int i;
qemu_printf("MMU: ways %d, entries %d, pid bits %d\n",