Skip to contentSkip to conversation

target-ppc: fix compile error when PPC_DUMP_CPU is enabled

PATCH Applied Alexey Kardashevskiy 2 participants 2 messages Dec 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-ppc: fix compile error when PPC_DUMP_CPU is enabled

Since last use of PPC_DUMP_CPU by whoever he/she was, env->tlb became a union and POWERPC CPU class got QOM'ed so defining PPC_DUMP_CPU breaks compile.

This fixes compiler errors.

---
 target-ppc/translate_init.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
target-ppc/translate_init.c +3 -2
index c030a20..5f59746 100644
@@ -8138,9 +8138,10 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp)
         }
         printf("PowerPC %-12s : PVR %08x MSR %016" PRIx64 "\n"
                "    MMU model        : %s\n",
-               pcc->name, pcc->pvr, pcc->msr_mask, mmu_model);
+               object_class_get_name(OBJECT_CLASS(pcc)),
+               pcc->pvr, pcc->msr_mask, mmu_model);
 #if !defined(CONFIG_USER_ONLY)
-        if (env->tlb != NULL) {
+        if (env->tlb.tlb6) {
             printf("                       %d %s TLB in %d ways\n",
                    env->nb_tlb, env->id_tlbs ? "splitted" : "merged",
                    env->nb_ways);
Signature · 1 line
1.8.4.rc4
#1 lore raw
Quoted 7 lines · Alexey Kardashevskiy

Since last use of PPC_DUMP_CPU by whoever he/she was, env->tlb became a union and POWERPC CPU class got QOM'ed so defining PPC_DUMP_CPU breaks compile.

This fixes compiler errors.

Thanks, applied to ppc-next.

Alex