From patchwork Sun Aug 19 10:59:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Fennell X-Patchwork-Id: 178556 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 D416E2C0094 for ; Sun, 19 Aug 2012 20:59:35 +1000 (EST) Received: from localhost ([::1]:59728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33EC-0005wR-3s for incoming@patchwork.ozlabs.org; Sun, 19 Aug 2012 06:59:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33E4-0005vq-AD for qemu-devel@nongnu.org; Sun, 19 Aug 2012 06:59:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T33E3-0005uS-9f for qemu-devel@nongnu.org; Sun, 19 Aug 2012 06:59:24 -0400 Received: from gir.skynet.ie ([193.1.99.77]:60404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33E3-0005uJ-3h for qemu-devel@nongnu.org; Sun, 19 Aug 2012 06:59:23 -0400 Received: from skynet.skynet.ie (skynet.skynet.ie [193.1.99.74]) by gir.skynet.ie (Postfix) with ESMTP id B3FFA10202; Sun, 19 Aug 2012 11:59:19 +0100 (IST) Received: by skynet.skynet.ie (Postfix, from userid 2582) id B1C5F5025F; Sun, 19 Aug 2012 11:59:19 +0100 (IST) From: Brendan Fennell To: qemu-devel@nongnu.org Date: Sun, 19 Aug 2012 11:59:10 +0100 Message-Id: <1345373950-16276-1-git-send-email-bfennell@skynet.ie> X-Mailer: git-send-email 1.6.3 To: bfennell@skynet.ie, qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 193.1.99.77 Cc: peter.maydell@linaro.org, Brendan Fennell Subject: [Qemu-devel] [PATCH v2] pl190: fix read of VECTADDR 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 Signed-off-by: Brendan Fennell --- hw/pl190.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pl190.c b/hw/pl190.c index cb50afb..eddb531 100644 --- a/hw/pl190.c +++ b/hw/pl190.c @@ -120,7 +120,8 @@ static uint64_t pl190_read(void *opaque, target_phys_addr_t offset, current priority level to that of the current interrupt. */ for (i = 0; i < s->priority; i++) { - if ((s->level | s->soft_level) & s->prio_mask[i]) + /* Ensure that 'i' is current highest priority interrupt on exit */ + if ((s->level | s->soft_level) & s->prio_mask[i+1]) break; } /* Reading this value with no pending interrupts is undefined.