From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp8Y-0001mB-W2 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzp8X-0000uF-C4 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:33:58 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp8X-0000r2-6M for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:33:57 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Yzp8T-00031f-FC for qemu-devel@nongnu.org; Tue, 02 Jun 2015 17:33:53 +0100 From: Peter Maydell Date: Tue, 2 Jun 2015 17:33:45 +0100 Message-Id: <1433262832-11527-16-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1433262832-11527-1-git-send-email-peter.maydell@linaro.org> References: <1433262832-11527-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 15/22] pl061: fix wrong calculation of GPIOMIS register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Victor CLEMENT The masked interrupt status register should be the state of the interrupt after masking. There should be a logical AND instead of a logical OR between the interrupt status and the interrupt mask. Signed-off-by: Victor CLEMENT Reviewed-by: Peter Crosthwaite Message-id: 1433154824-6927-1-git-send-email-victor.clement@openwide.fr Signed-off-by: Peter Maydell --- hw/gpio/pl061.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index bd03e99..4ba730b 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -173,7 +173,7 @@ static uint64_t pl061_read(void *opaque, hwaddr offset, case 0x414: /* Raw interrupt status */ return s->istate; case 0x418: /* Masked interrupt status */ - return s->istate | s->im; + return s->istate & s->im; case 0x420: /* Alternate function select */ return s->afsel; case 0x500: /* 2mA drive */ -- 1.9.1