On 2012-02-16 00:16, Igor Mammedov wrote: > All cpus except of boot cpu should be halted after reset. > So remove redundant pc_cpu_reset and use cpu_reset instead. > > Signed-off-by: Igor Mammedov <imamm...@redhat.com> > --- > hw/pc.c | 11 ++--------- > target-i386/helper.c | 1 + > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index d9c397a..3d35d78 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -928,14 +928,6 @@ typedef struct CPUPC { > CPUState state; > } CPUPC; > > -static void pc_cpu_reset(void *opaque) > -{ > - CPUState *env = opaque; > - > - cpu_reset(env); > - env->halted = !cpu_is_bsp(env); > -} > - > static int cpu_device_init(ICCBusDevice *dev) > { > CPUPC* cpu = DO_UPCAST(CPUPC, busdev, dev); > @@ -955,7 +947,8 @@ static int cpu_device_init(ICCBusDevice *dev) > static void cpu_device_reset(DeviceState *dev) { > CPUPC *cpu = DO_UPCAST(CPUPC, busdev.qdev, dev); > CPUState *env = &cpu->state; > - pc_cpu_reset(env); > + > + cpu_reset(env); > } > > static ICCBusDeviceInfo cpu_device_info = { > diff --git a/target-i386/helper.c b/target-i386/helper.c > index df2f5ba..cd61d36 100644 > --- a/target-i386/helper.c > +++ b/target-i386/helper.c > @@ -105,6 +105,7 @@ void cpu_reset(CPUX86State *env) > env->dr[7] = DR7_FIXED_1; > cpu_breakpoint_remove_all(env, BP_CPU); > cpu_watchpoint_remove_all(env, BP_CPU); > + env->halted = !cpu_is_bsp(env); > } > > void cpu_x86_close(CPUX86State *env)
See http://thread.gmane.org/gmane.comp.emulators.qemu/100806 for an earlier attempt to clean this up. I forgot about following up on this, but you should try to adopt the suggestions to avoid repeating that discussion. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux