Rename cpu_address_space_init to cpu_address_space_add in preparation for the forthcoming addition of a new cpu_address_space_init.
Signed-off-by: Gustavo Romero <[email protected]> --- include/exec/cpu-common.h | 6 +++--- stubs/cpu-destroy-address-spaces.c | 2 +- system/cpus.c | 2 +- system/physmem.c | 4 ++-- target/arm/cpu.c | 16 ++++++++-------- target/arm/cpu.h | 2 +- target/i386/kvm/kvm-cpu.c | 2 +- target/i386/kvm/kvm.c | 4 ++-- target/i386/tcg/system/tcg-cpu.c | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index e0be4ee2b8..126f645354 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -102,7 +102,7 @@ size_t qemu_ram_pagesize(RAMBlock *block); size_t qemu_ram_pagesize_largest(void); /** - * cpu_address_space_init: + * cpu_address_space_add: * @cpu: CPU to add this address space to * @asidx: integer index of this address space * @prefix: prefix to be used as name of address space @@ -120,8 +120,8 @@ size_t qemu_ram_pagesize_largest(void); * * Note that with KVM only one address space is supported. */ -void cpu_address_space_init(CPUState *cpu, int asidx, - const char *prefix, MemoryRegion *mr); +void cpu_address_space_add(CPUState *cpu, int asidx, + const char *prefix, MemoryRegion *mr); /** * cpu_destroy_address_spaces: * @cpu: CPU for which address spaces need to be destroyed diff --git a/stubs/cpu-destroy-address-spaces.c b/stubs/cpu-destroy-address-spaces.c index dc6813f5bd..a86e8d4db1 100644 --- a/stubs/cpu-destroy-address-spaces.c +++ b/stubs/cpu-destroy-address-spaces.c @@ -5,7 +5,7 @@ /* * user-mode CPUs never create address spaces with - * cpu_address_space_init(), so the cleanup function doesn't + * cpu_address_space_add(), so the cleanup function doesn't * need to do anything. We need this stub because cpu-common.c * is built-once so it can't #ifndef CONFIG_USER around the * call; the real function is in physmem.c which is system-only. diff --git a/system/cpus.c b/system/cpus.c index ef2d2f241f..fa9deafa29 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -719,7 +719,7 @@ void qemu_init_vcpu(CPUState *cpu) * give it the default one. */ cpu->num_ases = 1; - cpu_address_space_init(cpu, 0, "cpu-memory", cpu->memory); + cpu_address_space_add(cpu, 0, "cpu-memory", cpu->memory); } /* accelerators all implement the AccelOpsClass */ diff --git a/system/physmem.c b/system/physmem.c index c9869e4049..4a0c1b74f1 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -775,8 +775,8 @@ hwaddr memory_region_section_get_iotlb(CPUState *cpu, #endif /* CONFIG_TCG */ -void cpu_address_space_init(CPUState *cpu, int asidx, - const char *prefix, MemoryRegion *mr) +void cpu_address_space_add(CPUState *cpu, int asidx, + const char *prefix, MemoryRegion *mr) { CPUAddressSpace *newas; AddressSpace *as = g_new0(AddressSpace, 1); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 1640b20b4d..1902c510f9 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1681,7 +1681,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) * * Catch all the cases which might cause us to create more than one * address space for the CPU (otherwise we will assert() later in - * cpu_address_space_init()). + * cpu_address_space_add()). */ if (arm_feature(env, ARM_FEATURE_M)) { error_setg(errp, @@ -2158,22 +2158,22 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) cs->num_ases = 1 + has_secure; } - cpu_address_space_init(cs, ARMASIdx_NS, "cpu-memory", cs->memory); + cpu_address_space_add(cs, ARMASIdx_NS, "cpu-memory", cs->memory); if (has_secure) { if (!cpu->secure_memory) { cpu->secure_memory = cs->memory; } - cpu_address_space_init(cs, ARMASIdx_S, "cpu-secure-memory", - cpu->secure_memory); + cpu_address_space_add(cs, ARMASIdx_S, "cpu-secure-memory", + cpu->secure_memory); } if (cpu->tag_memory != NULL) { - cpu_address_space_init(cs, ARMASIdx_TagNS, "cpu-tag-memory", - cpu->tag_memory); + cpu_address_space_add(cs, ARMASIdx_TagNS, "cpu-tag-memory", + cpu->tag_memory); if (has_secure) { - cpu_address_space_init(cs, ARMASIdx_TagS, "cpu-tag-memory", - cpu->secure_tag_memory); + cpu_address_space_add(cs, ARMASIdx_TagS, "cpu-tag-memory", + cpu->secure_tag_memory); } } diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 00f5af0fcd..f68552945e 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2330,7 +2330,7 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_sync); #define TYPE_ARM_HOST_CPU "host-" TYPE_ARM_CPU -/* Indexes used when registering address spaces with cpu_address_space_init */ +/* Indexes used when registering address spaces with cpu_address_space_add */ typedef enum ARMASIdx { ARMASIdx_NS = 0, ARMASIdx_S = 1, diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9c25b55839..a6d94d0620 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -99,7 +99,7 @@ static bool kvm_cpu_realizefn(CPUState *cs, Error **errp) * initialized at register_smram_listener() after machine init done. */ cs->num_ases = x86_machine_is_smm_enabled(X86_MACHINE(current_machine)) ? 2 : 1; - cpu_address_space_init(cs, X86ASIdx_MEM, "cpu-memory", cs->memory); + cpu_address_space_add(cs, X86ASIdx_MEM, "cpu-memory", cs->memory); return true; } diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 60c7981138..dcc7e5eeae 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -2744,14 +2744,14 @@ static void register_smram_listener(Notifier *n, void *unused) &smram_address_space, X86ASIdx_SMM, "kvm-smram"); CPU_FOREACH(cpu) { - cpu_address_space_init(cpu, X86ASIdx_SMM, "cpu-smm", &smram_as_root); + cpu_address_space_add(cpu, X86ASIdx_SMM, "cpu-smm", &smram_as_root); } } /* It should only be called in cpu's hotplug callback */ void kvm_smm_cpu_address_space_init(X86CPU *cpu) { - cpu_address_space_init(CPU(cpu), X86ASIdx_SMM, "cpu-smm", &smram_as_root); + cpu_address_space_add(CPU(cpu), X86ASIdx_SMM, "cpu-smm", &smram_as_root); } static void *kvm_msr_energy_thread(void *data) diff --git a/target/i386/tcg/system/tcg-cpu.c b/target/i386/tcg/system/tcg-cpu.c index 7255862c24..231a4bdf55 100644 --- a/target/i386/tcg/system/tcg-cpu.c +++ b/target/i386/tcg/system/tcg-cpu.c @@ -74,8 +74,8 @@ bool tcg_cpu_realizefn(CPUState *cs, Error **errp) memory_region_set_enabled(cpu->cpu_as_mem, true); cs->num_ases = 2; - cpu_address_space_init(cs, X86ASIdx_MEM, "cpu-memory", cs->memory); - cpu_address_space_init(cs, X86ASIdx_SMM, "cpu-smm", cpu->cpu_as_root); + cpu_address_space_add(cs, X86ASIdx_MEM, "cpu-memory", cs->memory); + cpu_address_space_add(cs, X86ASIdx_SMM, "cpu-smm", cpu->cpu_as_root); /* ... SMRAM with higher priority, linked from /machine/smram. */ cpu->machine_done.notify = tcg_cpu_machine_done; -- 2.34.1
