From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STz8N-0005Oc-0h for qemu-devel@nongnu.org; Mon, 14 May 2012 13:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STz8C-0000ct-T6 for qemu-devel@nongnu.org; Mon, 14 May 2012 13:32:34 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49643 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STz8C-0000br-M3 for qemu-devel@nongnu.org; Mon, 14 May 2012 13:32:24 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 14 May 2012 19:32:09 +0200 Message-Id: <1337016729-12285-23-git-send-email-afaerber@suse.de> In-Reply-To: <1337016729-12285-1-git-send-email-afaerber@suse.de> References: <1337016729-12285-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next 22/22] pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Prepares for moving halted field into CPUState. Add missing braces. Signed-off-by: Andreas F=C3=A4rber --- hw/pxa2xx_gpio.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/pxa2xx_gpio.c b/hw/pxa2xx_gpio.c index 09a408b..3c90c9c 100644 --- a/hw/pxa2xx_gpio.c +++ b/hw/pxa2xx_gpio.c @@ -20,7 +20,7 @@ struct PXA2xxGPIOInfo { qemu_irq irq0, irq1, irqX; int lines; int ncpu; - CPUARMState *cpu_env; + ARMCPU *cpu; =20 /* XXX: GNU C vectors are more suitable */ uint32_t ilevel[PXA2XX_GPIO_BANKS]; @@ -118,8 +118,9 @@ static void pxa2xx_gpio_set(void *opaque, int line, i= nt level) pxa2xx_gpio_irq_update(s); =20 /* Wake-up GPIOs */ - if (s->cpu_env->halted && (mask & ~s->dir[bank] & pxa2xx_gpio_wake[b= ank])) - cpu_interrupt(s->cpu_env, CPU_INTERRUPT_EXITTB); + if (s->cpu->env.halted && (mask & ~s->dir[bank] & pxa2xx_gpio_wake[b= ank])) { + cpu_interrupt(&s->cpu->env, CPU_INTERRUPT_EXITTB); + } } =20 static void pxa2xx_gpio_handler_update(PXA2xxGPIOInfo *s) { @@ -275,7 +276,7 @@ static int pxa2xx_gpio_initfn(SysBusDevice *dev) =20 s =3D FROM_SYSBUS(PXA2xxGPIOInfo, dev); =20 - s->cpu_env =3D qemu_get_cpu(s->ncpu); + s->cpu =3D arm_env_get_cpu(qemu_get_cpu(s->ncpu)); =20 qdev_init_gpio_in(&dev->qdev, pxa2xx_gpio_set, s->lines); qdev_init_gpio_out(&dev->qdev, s->handler, s->lines); --=20 1.7.7