Received: from eggs.gnu.org ([140.186.70.92]:42730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RThT2-0004Qf-Hq for qemu-devel@nongnu.org; Thu, 24 Nov 2011 17:08:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RThT1-0003DK-J7 for qemu-devel@nongnu.org; Thu, 24 Nov 2011 17:08:28 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:37357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RThT1-00030g-Ec for qemu-devel@nongnu.org; Thu, 24 Nov 2011 17:08:27 -0500 From: Stefan Weil Date: Thu, 24 Nov 2011 23:07:33 +0100 Message-Id: <1322172453-26340-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH 1.0] malta: Fix regression (i8259 interrupts did not work) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil , Anthony Liguori , Avi Kivity , Aurelien Jarno Commit 5632ae46d5bda798e971dae48ebb318ac2c3686a passes the address of i8259 to qemu_irq_proxy. i8259 was an auto variable with undefined value outside of mips_malta_init. This made the proxy unusable. Ethernet for example no longer worked with MIPS Malta. There is only one Malta device with one i8259, so using a static variable for i8259 is the simplest solution which fixes the problem. Signed-off-by: Stefan Weil --- hw/mips_malta.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index bb49749..e4dc7fb 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -775,7 +775,10 @@ void mips_malta_init (ram_addr_t ram_size, int64_t kernel_entry; PCIBus *pci_bus; CPUState *env; - qemu_irq *i8259 = NULL, *isa_irq; + /* The address of i8259 is passed to qemu_irq_proxy and saved there, but + its value is set later, so it must have a fixed reserved address. */ + static qemu_irq *i8259; + qemu_irq *isa_irq; qemu_irq *cpu_exit_irq; int piix4_devfn; i2c_bus *smbus; -- 1.7.2.5