From 49e158785fa86f04e2d4027dd19719d8b79a4421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 30 Jan 2013 12:48:25 +0000 Subject: target-s390x: Pass S390CPU to s390_{add, del}_running_cpu() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prepares for moving the halted field to CPUState. Most call sites can already supply S390CPU, for some env becomes unused. Signed-off-by: Andreas Färber Acked-by: Cornelia Huck Signed-off-by: Alexander Graf --- hw/s390x/s390-virtio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hw/s390x/s390-virtio.c') diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index 2a1d9ac2da..e25c330320 100644 --- a/hw/s390x/s390-virtio.c +++ b/hw/s390x/s390-virtio.c @@ -130,8 +130,10 @@ static void s390_virtio_register_hcalls(void) */ static unsigned s390_running_cpus; -void s390_add_running_cpu(CPUS390XState *env) +void s390_add_running_cpu(S390CPU *cpu) { + CPUS390XState *env = &cpu->env; + if (env->halted) { s390_running_cpus++; env->halted = 0; @@ -139,8 +141,10 @@ void s390_add_running_cpu(CPUS390XState *env) } } -unsigned s390_del_running_cpu(CPUS390XState *env) +unsigned s390_del_running_cpu(S390CPU *cpu) { + CPUS390XState *env = &cpu->env; + if (env->halted == 0) { assert(s390_running_cpus >= 1); s390_running_cpus--; -- cgit v1.2.1