From patchwork Tue Feb 14 17:40:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 141164 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 864E0B6FE6 for ; Wed, 15 Feb 2012 05:27:19 +1100 (EST) Received: from localhost ([::1]:48089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxN5x-00051J-KI for incoming@patchwork.ozlabs.org; Tue, 14 Feb 2012 13:27:17 -0500 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 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RxMMp-0002Qs-Jh; Tue, 14 Feb 2012 17:40:39 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 14 Feb 2012 17:40:39 +0000 Message-Id: <1329241239-9327-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH] hw/pl031: Actually raise interrupt on timer expiry 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 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); }