From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
"Andreas Färber" <afaerber@suse.de>,
"Eduardo Habkost" <ehabkost@redhat.com>
Subject: [Qemu-devel] [PATCH RFC qom-cpu] linux-user: Avoid conditional cpu_reset()
Date: Wed, 10 Jul 2013 18:30:38 +0200 [thread overview]
Message-ID: <1373473838-1163-1-git-send-email-afaerber@suse.de> (raw)
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>
---
This had been discussed as a possible cleanup for the #ifdef.
I am uncertain whether we should do this since it hides the TODO item
of investigating ppc and sparc CPU reset.
linux-user/main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 7f15d3d..e904d8c 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3637,9 +3637,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);
--
1.8.1.4
next reply other threads:[~2013-07-10 16:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 16:30 Andreas Färber [this message]
2013-07-10 18:43 ` [Qemu-devel] [PATCH RFC qom-cpu] linux-user: Avoid conditional cpu_reset() Eduardo Habkost
2013-07-10 18:51 ` Peter Maydell
2013-07-10 19:02 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373473838-1163-1-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).