diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 1ea8ae457424..4c5bf079b728 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -658,6 +658,8 @@ void hpet_broadcast_resume(void) u32 cfg; unsigned int i, n; + printk("%s:%d: hpet_events: %p\n", __func__, __LINE__, hpet_events); + if ( !hpet_events ) return; @@ -667,23 +669,30 @@ void hpet_broadcast_resume(void) if ( num_hpets_used > 0 ) { + printk("%s:%d: num_hpets_used: %d\n", __func__, __LINE__, num_hpets_used); /* Stop HPET legacy interrupts */ cfg &= ~HPET_CFG_LEGACY; n = num_hpets_used; } else if ( hpet_events->flags & HPET_EVT_DISABLE ) + { + printk("%s:%d: hpet_events->flags: %#x\n", __func__, __LINE__, hpet_events->flags); return; + } else { /* Start HPET legacy interrupts */ + printk("%s:%d\n", __func__, __LINE__); cfg |= HPET_CFG_LEGACY; n = 1; } + printk("%s:%d: cfg: %#x\n", __func__, __LINE__, cfg); hpet_write32(cfg, HPET_CFG); for ( i = 0; i < n; i++ ) { + printk("%s:%d: i:%d, hpet_events[i].msi.irq: %d, hpet_events[i].flags: %#x\n", __func__, __LINE__, i, hpet_events[i].msi.irq, hpet_events[i].flags); if ( hpet_events[i].msi.irq >= 0 ) __hpet_setup_msi_irq(irq_to_desc(hpet_events[i].msi.irq)); @@ -694,6 +703,7 @@ void hpet_broadcast_resume(void) if ( !(hpet_events[i].flags & HPET_EVT_LEGACY) ) cfg |= HPET_TN_FSB; hpet_write32(cfg, HPET_Tn_CFG(hpet_events[i].idx)); + printk("%s:%d: i:%d, cfg: %#x\n", __func__, __LINE__, i, cfg); hpet_events[i].next_event = STIME_MAX; } diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index fed30a919d2c..15113ebdfb6c 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -2646,6 +2646,7 @@ static int _disable_pit_irq(bool init) { int ret = 1; + printk("%s:%d: using_pit: %d, cpu_has_apic: %d\n", __func__, __LINE__, using_pit, cpu_has_apic); if ( using_pit || !cpu_has_apic ) return -1; @@ -2655,8 +2656,10 @@ static int _disable_pit_irq(bool init) * XXX dom0 may rely on RTC interrupt delivery, so only enable * hpet_broadcast if FSB mode available or if force_hpet_broadcast. */ + printk("%s:%d: cpuidle_using_deep_cstate: %d, boot_cpu_has(X86_FEATURE_XEN_ARAT): %d\n", __func__, __LINE__, cpuidle_using_deep_cstate(), boot_cpu_has(X86_FEATURE_XEN_ARAT)); if ( cpuidle_using_deep_cstate() && !boot_cpu_has(X86_FEATURE_XEN_ARAT) ) { + printk("%s:%d: init: %d\n", __func__, __LINE__, init); init ? hpet_broadcast_init() : hpet_broadcast_resume(); if ( !hpet_broadcast_is_available() ) {