summary refs log tree commit diff stats
path: root/exec.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-07-02 12:40:17 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-07-10 18:02:24 -0400
commit421a75e283f6bad2ac64119ecf6a1dfd3ebfda61 (patch)
tree197a3065cd878cd0d18efb36bd27020cca293a1c /exec.c
parentcbe0dad1906d29d9ea83169b672e9e709c9fc1f8 (diff)
downloadfocaccia-qemu-421a75e283f6bad2ac64119ecf6a1dfd3ebfda61.tar.gz
focaccia-qemu-421a75e283f6bad2ac64119ecf6a1dfd3ebfda61.zip
cpus: Move CPU code from exec.c to cpus-common.c
This code was introduced with SMP support in commit 6a00d60127,
later commit 267f685b8b moved CPU list management to common code
but forgot this code. Move now and simplify ifdef'ry.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200702104017.14057-1-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/exec.c b/exec.c
index 893636176e..6f381f98e2 100644
--- a/exec.c
+++ b/exec.c
@@ -98,12 +98,6 @@ AddressSpace address_space_memory;
 static MemoryRegion io_mem_unassigned;
 #endif
 
-CPUTailQ cpus = QTAILQ_HEAD_INITIALIZER(cpus);
-
-/* current CPU in the current thread. It is only valid inside
-   cpu_exec() */
-__thread CPUState *current_cpu;
-
 uintptr_t qemu_host_page_size;
 intptr_t qemu_host_page_mask;
 
@@ -832,22 +826,6 @@ const VMStateDescription vmstate_cpu_common = {
     }
 };
 
-#endif
-
-CPUState *qemu_get_cpu(int index)
-{
-    CPUState *cpu;
-
-    CPU_FOREACH(cpu) {
-        if (cpu->cpu_index == index) {
-            return cpu;
-        }
-    }
-
-    return NULL;
-}
-
-#if !defined(CONFIG_USER_ONLY)
 void cpu_address_space_init(CPUState *cpu, int asidx,
                             const char *prefix, MemoryRegion *mr)
 {