This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH] x86/HPET: fix oversight in 23033:84bacd800bf8

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86/HPET: fix oversight in 23033:84bacd800bf8
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 15 Mar 2011 09:55:11 +0000
Delivery-date: Tue, 15 Mar 2011 02:55:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Clearly for the adjusted BUG_ON()s to not yield false positives
num_chs_used must be incremented before setting up an IRQ (and
decremented back when the setup failed).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -428,10 +428,8 @@ static unsigned int __init hpet_fsb_cap_
         ch->flags = 0;
         ch->idx = i;
-        if ( (ch->irq = hpet_assign_irq(num_chs_used)) < 0 )
-            continue;
-        num_chs_used++;
+        if ( (ch->irq = hpet_assign_irq(num_chs_used++)) < 0 )
+            num_chs_used--;
     printk(XENLOG_INFO "HPET: %u timers (%u will be used for broadcast)\n",

Attachment: x86-hpet-fix-23033.patch
Description: Text document

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86/HPET: fix oversight in 23033:84bacd800bf8, Jan Beulich <=