From patchwork Thu Jan 20 16:04:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 79712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3141EB70E2 for ; Fri, 21 Jan 2011 03:06:18 +1100 (EST) Received: from localhost ([127.0.0.1]:34227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfx1b-0007Qf-GA for incoming@patchwork.ozlabs.org; Thu, 20 Jan 2011 11:06:15 -0500 Received: from [140.186.70.92] (port=54190 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfx0L-0006qW-Ji for qemu-devel@nongnu.org; Thu, 20 Jan 2011 11:04:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pfx0K-0005EV-Cd for qemu-devel@nongnu.org; Thu, 20 Jan 2011 11:04:57 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:44552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pfx0K-0005EN-4E for qemu-devel@nongnu.org; Thu, 20 Jan 2011 11:04:56 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1Pfx0G-0001of-Oe; Thu, 20 Jan 2011 16:04:52 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 20 Jan 2011 16:04:52 +0000 Message-Id: <1295539492-6960-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Himanshu Chauhan , Aurelien Jarno , patches@linaro.org Subject: [Qemu-devel] [PATCH] hw/pl190.c: Fix writing of default vector address X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The PL190 implementation keeps the default vector address in vect_addr[16], but we weren't using this for writes to the DEFVECTADDR register. As a result of this fix the default_addr structure member is unused and we can delete it. Reported-by: Himanshu Chauhan Signed-off-by: Peter Maydell --- (This patch addresses Aurelien's comments on Himanshu's patch from November: http://patchwork.ozlabs.org/patch/69768/) hw/pl190.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/hw/pl190.c b/hw/pl190.c index 17c279b..75f2ba1 100644 --- a/hw/pl190.c +++ b/hw/pl190.c @@ -21,7 +21,6 @@ typedef struct { uint32_t soft_level; uint32_t irq_enable; uint32_t fiq_select; - uint32_t default_addr; uint8_t vect_control[16]; uint32_t vect_addr[PL190_NUM_PRIO]; /* Mask containing interrupts with higher priority than this one. */ @@ -186,7 +185,7 @@ static void pl190_write(void *opaque, target_phys_addr_t offset, uint32_t val) s->priority = s->prev_prio[s->priority]; break; case 13: /* DEFVECTADDR */ - s->default_addr = val; + s->vect_addr[16] = val; break; case 0xc0: /* ITCR */ if (val) { @@ -252,7 +251,6 @@ static const VMStateDescription vmstate_pl190 = { VMSTATE_UINT32(soft_level, pl190_state), VMSTATE_UINT32(irq_enable, pl190_state), VMSTATE_UINT32(fiq_select, pl190_state), - VMSTATE_UINT32(default_addr, pl190_state), VMSTATE_UINT8_ARRAY(vect_control, pl190_state, 16), VMSTATE_UINT32_ARRAY(vect_addr, pl190_state, PL190_NUM_PRIO), VMSTATE_UINT32_ARRAY(prio_mask, pl190_state, PL190_NUM_PRIO+1),