target-i386: Pass X86CPU to cpu_x86_load_seg_cache_sipi()
authorAndreas Färber <afaerber@suse.de>
Thu, 3 May 2012 13:37:01 +0000 (15:37 +0200)
committerAndreas Färber <afaerber@suse.de>
Tue, 30 Oct 2012 21:38:37 +0000 (22:38 +0100)
Simplifies the call in apic_sipi() again and needed for moving halted
field to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
hw/apic.c
target-i386/cpu.h

index 99e84f9..4bc14e0 100644 (file)
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -487,7 +487,7 @@ void apic_sipi(DeviceState *d)
 
     if (!s->wait_for_sipi)
         return;
-    cpu_x86_load_seg_cache_sipi(&s->cpu->env, s->sipi_vector);
+    cpu_x86_load_seg_cache_sipi(s->cpu, s->sipi_vector);
     s->wait_for_sipi = 0;
 }
 
index de33303..d840914 100644 (file)
@@ -907,9 +907,11 @@ static inline void cpu_x86_load_seg_cache(CPUX86State *env,
     }
 }
 
-static inline void cpu_x86_load_seg_cache_sipi(CPUX86State *env,
+static inline void cpu_x86_load_seg_cache_sipi(X86CPU *cpu,
                                                int sipi_vector)
 {
+    CPUX86State *env = &cpu->env;
+
     env->eip = 0;
     cpu_x86_load_seg_cache(env, R_CS, sipi_vector << 8,
                            sipi_vector << 12,