xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH qom-cpu 6/7] xen: Simplify halting of first CPU
       [not found] <1355931071-22100-1-git-send-email-afaerber@suse.de>
@ 2012-12-19 15:31 ` Andreas Färber
  0 siblings, 0 replies; only message in thread
From: Andreas Färber @ 2012-12-19 15:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: open list:X86, Andreas Färber, Stefano Stabellini

Use the global first_cpu variable to halt the CPU rather than using a
local first_cpu initialized from qemu_get_cpu(0).

This will allow to change qemu_get_cpu() return type to CPUState
despite use of the CPU_COMMON halted field in the reset handler.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 xen-all.c |    4 +---
 1 Datei geändert, 1 Zeile hinzugefügt(+), 3 Zeilen entfernt(-)

diff --git a/xen-all.c b/xen-all.c
index daf43b9..e87ed7a 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -584,9 +584,7 @@ static void xen_reset_vcpu(void *opaque)
 
 void xen_vcpu_init(void)
 {
-    CPUArchState *first_cpu;
-
-    if ((first_cpu = qemu_get_cpu(0))) {
+    if (first_cpu != NULL) {
         qemu_register_reset(xen_reset_vcpu, first_cpu);
         xen_reset_vcpu(first_cpu);
     }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-19 15:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1355931071-22100-1-git-send-email-afaerber@suse.de>
2012-12-19 15:31 ` [PATCH qom-cpu 6/7] xen: Simplify halting of first CPU Andreas Färber

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).