From patchwork Fri Oct 12 02:23:08 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: 191049 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 A102C2C0089 for ; Fri, 12 Oct 2012 13:24:38 +1100 (EST) Received: from localhost ([::1]:36943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMUvU-00085J-Pv for incoming@patchwork.ozlabs.org; Thu, 11 Oct 2012 22:24:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMUuO-0004lE-4e for qemu-devel@nongnu.org; Thu, 11 Oct 2012 22:23:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMUuJ-0008QA-6t for qemu-devel@nongnu.org; Thu, 11 Oct 2012 22:23:28 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53902 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMUuI-0008Pu-Lv for qemu-devel@nongnu.org; Thu, 11 Oct 2012 22:23:23 -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 41790A2BD5; Fri, 12 Oct 2012 04:23:22 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2012 04:23:08 +0200 Message-Id: <1350008589-30711-6-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350008589-30711-1-git-send-email-afaerber@suse.de> References: <1350008589-30711-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: blauwirbel@gmail.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH v2 5/5] sun4u: Pass SPARCCPU to cpu_set_ivec_irq() 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 moving halted field to CPUState. Signed-off-by: Andreas Färber --- hw/sun4u.c | 7 +++---- 1 Datei geändert, 3 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index 0453522..940db33 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -321,7 +321,8 @@ static void cpu_kick_irq(SPARCCPU *cpu) static void cpu_set_ivec_irq(void *opaque, int irq, int level) { - CPUSPARCState *env = opaque; + SPARCCPU *cpu = opaque; + CPUSPARCState *env = &cpu->env; if (level) { if (!(env->ivec_status & 0x20)) { @@ -802,7 +803,6 @@ static void sun4uv_init(MemoryRegion *address_space_mem, const struct hwdef *hwdef) { SPARCCPU *cpu; - CPUSPARCState *env; M48t59State *nvram; unsigned int i; uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry; @@ -815,14 +815,13 @@ static void sun4uv_init(MemoryRegion *address_space_mem, /* init CPUs */ cpu = cpu_devinit(cpu_model, hwdef); - env = &cpu->env; /* set up devices */ ram_init(0, RAM_size); prom_init(hwdef->prom_addr, bios_name); - ivec_irqs = qemu_allocate_irqs(cpu_set_ivec_irq, env, IVEC_MAX); + ivec_irqs = qemu_allocate_irqs(cpu_set_ivec_irq, cpu, IVEC_MAX); pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, ivec_irqs, &pci_bus2, &pci_bus3, &pbm_irqs); pci_vga_init(pci_bus);