linux-user: Avoid conditional cpu_reset()
authorAndreas Färber <afaerber@suse.de>
Wed, 10 Jul 2013 16:30:38 +0000 (18:30 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 22 Jul 2013 19:08:33 +0000 (22:08 +0300)
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 <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/main.c

index 5537967..547884c 100644 (file)
@@ -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);