From patchwork Tue Jul 23 15:49:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 261116 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A47F62C00C9 for ; Wed, 24 Jul 2013 01:55:29 +1000 (EST) Received: from localhost ([::1]:34623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1evt-0005Oc-GN for incoming@patchwork.ozlabs.org; Tue, 23 Jul 2013 11:55:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1eqD-0005Oe-RM for qemu-devel@nongnu.org; Tue, 23 Jul 2013 11:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1epz-0001b0-Gr for qemu-devel@nongnu.org; Tue, 23 Jul 2013 11:49:33 -0400 Received: from afflict.kos.to ([92.243.29.197]:45196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1epz-0001aV-C1 for qemu-devel@nongnu.org; Tue, 23 Jul 2013 11:49:19 -0400 Received: from kos.to (a91-156-63-85.elisa-laajakaista.fi [91.156.63.85]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id A3D3626552 for ; Tue, 23 Jul 2013 17:49:17 +0200 (CEST) Received: from voipio (uid 1000) (envelope-from voipio@kos.to) id 5e080f by kos.to (DragonFly Mail Agent); Tue, 23 Jul 2013 18:49:13 +0300 From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 23 Jul 2013 18:49:04 +0300 Message-Id: <885a73f72b967900296d71c97cc7c560585a9086.1374593203.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Eduardo Habkost Subject: [Qemu-devel] [PULL 14/21] linux-user: Avoid conditional cpu_reset() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Andreas Färber Some CPUs reset as part of cpu_init(), some others were reset afterwards, some not at all. While some targets didn't implement a cpu_[state_]reset() function, QOM cpu_reset() is always available. There's nothing wrong with resetting twice on startup, so drop the #ifdef. Suggested-by: Peter Maydell Signed-off-by: Andreas Färber Cc: Eduardo Habkost Signed-off-by: Riku Voipio --- linux-user/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 5537967..547884c 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3594,9 +3594,7 @@ int main(int argc, char **argv, char **envp) fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } -#if defined(TARGET_SPARC) || defined(TARGET_PPC) cpu_reset(ENV_GET_CPU(env)); -#endif thread_cpu = ENV_GET_CPU(env);