From patchwork Mon Apr 2 17:09:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 150195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 56690B6FA3 for ; Tue, 3 Apr 2012 03:11:10 +1000 (EST) Received: from localhost ([::1]:32955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEkmZ-0001YO-Vx for incoming@patchwork.ozlabs.org; Mon, 02 Apr 2012 13:11:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEklm-000824-BB for qemu-devel@nongnu.org; Mon, 02 Apr 2012 13:10:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEkld-0002R1-5n for qemu-devel@nongnu.org; Mon, 02 Apr 2012 13:10:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44784 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEklc-0002QX-Rr for qemu-devel@nongnu.org; Mon, 02 Apr 2012 13:10:09 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id C5BE3919A3; Mon, 2 Apr 2012 19:10:07 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Mon, 2 Apr 2012 19:09:38 +0200 Message-Id: <1333386578-29412-5-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1333386578-29412-1-git-send-email-afaerber@suse.de> References: <1333386578-29412-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Christian Borntraeger , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf Subject: [Qemu-devel] [PATCH v2 4/4] target-s390x: Update s390x_{tod, cpu}_timer to use S390CPU 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 In place of CPUS390XState pass S390CPU as opaque from the new initfn. cpu_interrupt() is anticipated to take a CPUState in the future. Signed-off-by: Andreas Färber --- target-s390x/cpu.c | 4 ++-- target-s390x/helper.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 72ec349..f183213 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -60,8 +60,8 @@ static void s390_cpu_initfn(Object *obj) env->tod_offset = TOD_UNIX_EPOCH + (time2tod(mktimegm(&tm)) * 1000000000ULL); env->tod_basetime = 0; - env->tod_timer = qemu_new_timer_ns(vm_clock, s390x_tod_timer, env); - env->cpu_timer = qemu_new_timer_ns(vm_clock, s390x_cpu_timer, env); + env->tod_timer = qemu_new_timer_ns(vm_clock, s390x_tod_timer, cpu); + env->cpu_timer = qemu_new_timer_ns(vm_clock, s390x_cpu_timer, cpu); #endif env->cpu_num = cpu_num++; env->ext_index = -1; diff --git a/target-s390x/helper.c b/target-s390x/helper.c index 6233f9a..209a696 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -53,7 +53,8 @@ #ifndef CONFIG_USER_ONLY void s390x_tod_timer(void *opaque) { - CPUS390XState *env = opaque; + S390CPU *cpu = opaque; + CPUS390XState *env = &cpu->env; env->pending_int |= INTERRUPT_TOD; cpu_interrupt(env, CPU_INTERRUPT_HARD); @@ -61,7 +62,8 @@ void s390x_tod_timer(void *opaque) void s390x_cpu_timer(void *opaque) { - CPUS390XState *env = opaque; + S390CPU *cpu = opaque; + CPUS390XState *env = &cpu->env; env->pending_int |= INTERRUPT_CPUTIMER; cpu_interrupt(env, CPU_INTERRUPT_HARD);