From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxo5I-0000xi-Nv for qemu-devel@nongnu.org; Wed, 15 Feb 2012 18:16:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxo5H-0000Lf-3q for qemu-devel@nongnu.org; Wed, 15 Feb 2012 18:16:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxo5G-0000LU-TE for qemu-devel@nongnu.org; Wed, 15 Feb 2012 18:16:23 -0500 From: Igor Mammedov Date: Thu, 16 Feb 2012 00:16:11 +0100 Message-Id: <1329347774-23262-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1329347774-23262-1-git-send-email-imammedo@redhat.com> References: <1329347774-23262-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 4/7] cleanup: remove redundant pc_cpu_reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jan.kiszka@siemens.com, gleb@redhat.com 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 --- 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) -- 1.7.7.6