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: 6775 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2EA0A23EAE for ; Tue, 14 Feb 2012 17:40:44 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id E3797A188B9 for ; Tue, 14 Feb 2012 17:40:43 +0000 (UTC) Received: by iabz7 with SMTP id z7so304067iab.11 for ; Tue, 14 Feb 2012 09:40:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.80.3 with SMTP id t3mr29272617ick.49.1329241243243; Tue, 14 Feb 2012 09:40:43 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.66.135 with SMTP id n7cs96044ibi; Tue, 14 Feb 2012 09:40:43 -0800 (PST) Received: by 10.14.22.65 with SMTP id s41mr7054163ees.50.1329241241843; Tue, 14 Feb 2012 09:40:41 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id f58si150233wed.9.2012.02.14.09.40.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Feb 2012 09:40:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org Subject: [PATCH] hw/pl031: Actually raise interrupt on timer expiry 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-Gm-Message-State: ALoCoQkBUbLZz2mLnJ9pPaImR2ANCG7NWULt2CSBcP/azJu6oXPB0tHHpYrhk5xGKNnfJqZeYiQX 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); }