From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxN5m-0004t3-4y for qemu-devel@nongnu.org; Tue, 14 Feb 2012 13:27:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxN5l-00059h-5N for qemu-devel@nongnu.org; Tue, 14 Feb 2012 13:27:06 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:38161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxN5k-00051J-Tc for qemu-devel@nongnu.org; Tue, 14 Feb 2012 13:27:05 -0500 From: Peter Maydell Date: Tue, 14 Feb 2012 17:40:39 +0000 Message-Id: <1329241239-9327-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] hw/pl031: Actually raise interrupt on timer expiry List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org Fix a typo in pl031_interrupt() which meant we were setting a bit in the interrupt mask rather than the interrupt status register and thus not actually raising an interrupt. This fix allows the rtctest program from the kernel's Documentation/rtc.txt to pass rather than hanging. Signed-off-by: Peter Maydell --- Looks like our PL031 has always had this bug since it was added in 2007... Daniel Forsgren reported this, suggested the fix and pointed me at the test program. Thanks! https://bugs.launchpad.net/qemu-linaro/+bug/931940 hw/pl031.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pl031.c b/hw/pl031.c index 8416a60..f06b5ae 100644 --- a/hw/pl031.c +++ b/hw/pl031.c @@ -76,7 +76,7 @@ static void pl031_interrupt(void * opaque) { pl031_state *s = (pl031_state *)opaque; - s->im = 1; + s->is = 1; DPRINTF("Alarm raised\n"); pl031_update(s); } -- 1.7.1