From patchwork Wed Oct 31 00:59:55 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: 195687 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 E5C022C007E for ; Wed, 31 Oct 2012 12:48:58 +1100 (EST) Received: from localhost ([::1]:37444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMh5-0001kO-Hz for incoming@patchwork.ozlabs.org; Tue, 30 Oct 2012 21:02:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfv-000097-IO for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTMfp-0005Oq-DD for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:55 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52415 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfo-0005OE-S4 for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:49 -0400 Received: from relay2.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 06DF3A3CEE; Wed, 31 Oct 2012 02:00:47 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Wed, 31 Oct 2012 01:59:55 +0100 Message-Id: <1351645206-3041-25-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351645206-3041-1-git-send-email-afaerber@suse.de> References: <1351645206-3041-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: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH 24/35] xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb() 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 Needed for changing cpu_has_work() argument type to CPUState. Signed-off-by: Andreas Färber Acked-by: Max Filippov --- hw/xtensa_pic.c | 7 +++++-- 1 Datei geändert, 5 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/hw/xtensa_pic.c b/hw/xtensa_pic.c index 653ded6..8b9c051 100644 --- a/hw/xtensa_pic.c +++ b/hw/xtensa_pic.c @@ -125,7 +125,8 @@ void xtensa_rearm_ccompare_timer(CPUXtensaState *env) static void xtensa_ccompare_cb(void *opaque) { - CPUXtensaState *env = opaque; + XtensaCPU *cpu = opaque; + CPUXtensaState *env = &cpu->env; if (env->halted) { env->halt_clock = qemu_get_clock_ns(vm_clock); @@ -139,12 +140,14 @@ static void xtensa_ccompare_cb(void *opaque) void xtensa_irq_init(CPUXtensaState *env) { + XtensaCPU *cpu = xtensa_env_get_cpu(env); + env->irq_inputs = (void **)qemu_allocate_irqs( xtensa_set_irq, env, env->config->ninterrupt); if (xtensa_option_enabled(env->config, XTENSA_OPTION_TIMER_INTERRUPT) && env->config->nccompare > 0) { env->ccompare_timer = - qemu_new_timer_ns(vm_clock, &xtensa_ccompare_cb, env); + qemu_new_timer_ns(vm_clock, &xtensa_ccompare_cb, cpu); } }