aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpus.c10
-rw-r--r--hmp.c8
-rw-r--r--scripts/qapi.py2
3 files changed, 11 insertions, 9 deletions
diff --git a/cpus.c b/cpus.c
index 882b61851a..898426ca56 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1576,13 +1576,13 @@ CpuInfoList *qmp_query_cpus(Error **errp)
info->value->u.ppc->nip = env->nip;
#elif defined(TARGET_SPARC)
info->value->arch = CPU_INFO_ARCH_SPARC;
- info->value->u.sparc = g_new0(CpuInfoSPARC, 1);
- info->value->u.sparc->pc = env->pc;
- info->value->u.sparc->npc = env->npc;
+ info->value->u.q_sparc = g_new0(CpuInfoSPARC, 1);
+ info->value->u.q_sparc->pc = env->pc;
+ info->value->u.q_sparc->npc = env->npc;
#elif defined(TARGET_MIPS)
info->value->arch = CPU_INFO_ARCH_MIPS;
- info->value->u.mips = g_new0(CpuInfoMIPS, 1);
- info->value->u.mips->PC = env->active_tc.PC;
+ info->value->u.q_mips = g_new0(CpuInfoMIPS, 1);
+ info->value->u.q_mips->PC = env->active_tc.PC;
#elif defined(TARGET_TRICORE)
info->value->arch = CPU_INFO_ARCH_TRICORE;
info->value->u.tricore = g_new0(CpuInfoTricore, 1);
diff --git a/hmp.c b/hmp.c
index 3e2a9891c4..c6419da72f 100644
--- a/hmp.c
+++ b/hmp.c
@@ -319,11 +319,13 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict)
monitor_printf(mon, " nip=0x%016" PRIx64, cpu->value->u.ppc->nip);
break;
case CPU_INFO_ARCH_SPARC:
- monitor_printf(mon, " pc=0x%016" PRIx64, cpu->value->u.sparc->pc);
- monitor_printf(mon, " npc=0x%016" PRIx64, cpu->value->u.sparc->npc);
+ monitor_printf(mon, " pc=0x%016" PRIx64,
+ cpu->value->u.q_sparc->pc);
+ monitor_printf(mon, " npc=0x%016" PRIx64,
+ cpu->value->u.q_sparc->npc);
break;
case CPU_INFO_ARCH_MIPS:
- monitor_printf(mon, " PC=0x%016" PRIx64, cpu->value->u.mips->PC);
+ monitor_printf(mon, " PC=0x%016" PRIx64, cpu->value->u.q_mips->PC);
break;
case CPU_INFO_ARCH_TRICORE:
monitor_printf(mon, " PC=0x%016" PRIx64, cpu->value->u.tricore->PC);
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 7519cf8e7a..f40dc9e777 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -1482,7 +1482,7 @@ def c_name(name, protect=True):
'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not',
'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'])
# namespace pollution:
- polluted_words = set(['unix', 'errno'])
+ polluted_words = set(['unix', 'errno', 'mips', 'sparc'])
name = name.translate(c_name_trans)
if protect and (name in c89_words | c99_words | c11_words | gcc_words
| cpp_words | polluted_words):