aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hpet.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-03-15 10:02:36 +0000
committerJan Beulich <jbeulich@novell.com>2011-03-15 10:02:36 +0000
commit436308d761e9f1a580f35cc69abb4d594b6fe4fb (patch)
tree42fa14021598c8b1d50853cb72b5a19ab96ce7e1 /xen/arch/x86/hpet.c
parentc5b9d74246c3fb193431b0dad4da61c2effaab35 (diff)
downloadxen-436308d761e9f1a580f35cc69abb4d594b6fe4fb.tar.gz
xen-436308d761e9f1a580f35cc69abb4d594b6fe4fb.tar.bz2
xen-436308d761e9f1a580f35cc69abb4d594b6fe4fb.zip
x86/HPET: fix oversight in 23033:84bacd800bf8
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@novell.com>
Diffstat (limited to 'xen/arch/x86/hpet.c')
-rw-r--r--xen/arch/x86/hpet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index b5301c59c2..987a9ff8ce 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -428,10 +428,8 @@ static unsigned int __init hpet_fsb_cap_lookup(void)
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",