Adapt the term address/adddr. While at it, fix the type and drop the initialization to 0 (which is superfluous).
Signed-off-by: David Hildenbrand <da...@redhat.com> --- target/s390x/cpu-qom.h | 2 +- target/s390x/cpu.c | 9 ++++----- target/s390x/helper.c | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h index 4e936e7788..a3a3ada226 100644 --- a/target/s390x/cpu-qom.h +++ b/target/s390x/cpu-qom.h @@ -52,7 +52,7 @@ typedef struct S390CPUClass { bool is_migration_safe; const char *desc; - int64_t next_cpu_id; + uint32_t next_cpu_addr; DeviceRealize parent_realize; void (*parent_reset)(CPUState *cpu); diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 156589e921..ffc1ff9a2b 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -201,10 +201,10 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) cpu->env.cpu_addr); goto out; } - if (cpu->env.cpu_addr != scc->next_cpu_id) { + if (cpu->env.cpu_addr != scc->next_cpu_addr) { error_setg(&err, "Unable to add CPU: %" PRIu32 - ", the next available nr is %" PRIi64, cpu->env.cpu_addr, - scc->next_cpu_id); + ", the next available addr is %" PRIu32, cpu->env.cpu_addr, + scc->next_cpu_addr); goto out; } @@ -214,7 +214,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp) if (err != NULL) { goto out; } - scc->next_cpu_id++; + scc->next_cpu_addr++; #if !defined(CONFIG_USER_ONLY) qemu_register_reset(s390_cpu_machine_reset_cb, cpu); @@ -459,7 +459,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) CPUClass *cc = CPU_CLASS(scc); DeviceClass *dc = DEVICE_CLASS(oc); - scc->next_cpu_id = 0; scc->parent_realize = dc->realize; dc->realize = s390_cpu_realizefn; dc->props = s390x_cpu_properties; diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 70d1ea8cf6..d8f198cf6f 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -134,9 +134,9 @@ S390CPU *cpu_s390x_init(const char *cpu_model) Error *err = NULL; S390CPU *cpu; /* Use to track CPU ID for linux-user only */ - static int64_t next_cpu_id; + static uint32_t next_cpu_addr; - cpu = s390x_new_cpu(cpu_model, next_cpu_id++, &err); + cpu = s390x_new_cpu(cpu_model, next_cpu_addr++, &err); if (err) { error_report_err(err); } -- 2.13.5