mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* hpet_disable() call sites
@ 2012-03-27  8:19 Jan Beulich
  2012-03-27 12:58 ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2012-03-27  8:19 UTC (permalink / raw)
  To: mingo, hirofumi; +Cc: tglx, linux-kernel, hpa

In c86c7fbc829e27e2a4093f98ded9fbd75e515adb (and subsequently
0c1b2724069951b1902373e688042b2ec382f68f) hpet_disable() gets
called in the shutdown path. The first of them gives HPET enabling
through PCI quirks in conjunction with the use of legacy replacement
as sole reason, yet even outside of the context of either the starting
up kernel has a problem if the HPET is in an unexpected state, in
particular preventing "normal" timer interrupts from occurring (which
was in particular found to be the case during kdump attempts after
Xen was running).

Is there any reason why hpet_disable() should not also be called
from (or some equivalent action be taken, perhaps including clearing
certain bits in the individual counters' configuration registers, which
are apparently - but perhaps wrongly - implied to be clear in e.g.
hpet_set_mode(), in) hpet_enable()?

Thanks, Jan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hpet_disable() call sites
  2012-03-27  8:19 hpet_disable() call sites Jan Beulich
@ 2012-03-27 12:58 ` Thomas Gleixner
  2012-03-27 13:16   ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2012-03-27 12:58 UTC (permalink / raw)
  To: Jan Beulich; +Cc: mingo, hirofumi, linux-kernel, hpa

On Tue, 27 Mar 2012, Jan Beulich wrote:
> up kernel has a problem if the HPET is in an unexpected state, in
> particular preventing "normal" timer interrupts from occurring (which
> was in particular found to be the case during kdump attempts after
> Xen was running).

What's Xen doing special with the hpet ?
 
> Is there any reason why hpet_disable() should not also be called
> from (or some equivalent action be taken, perhaps including clearing
> certain bits in the individual counters' configuration registers, which
> are apparently - but perhaps wrongly - implied to be clear in e.g.
> hpet_set_mode(), in) hpet_enable()?

No, there is no particular reason why we don't clear those registers.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hpet_disable() call sites
  2012-03-27 12:58 ` Thomas Gleixner
@ 2012-03-27 13:16   ` Jan Beulich
  2012-03-27 13:54     ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2012-03-27 13:16 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: mingo, hirofumi, linux-kernel, hpa

>>> On 27.03.12 at 14:58, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 27 Mar 2012, Jan Beulich wrote:
>> up kernel has a problem if the HPET is in an unexpected state, in
>> particular preventing "normal" timer interrupts from occurring (which
>> was in particular found to be the case during kdump attempts after
>> Xen was running).
> 
> What's Xen doing special with the hpet ?

Just like Linux it may use the legacy routing and fsb delivery bits, and
a (native) kdump kernel subsequently coming up would fail the
timer-connected-to-IOAPIC test if either remained enabled.

>> Is there any reason why hpet_disable() should not also be called
>> from (or some equivalent action be taken, perhaps including clearing
>> certain bits in the individual counters' configuration registers, which
>> are apparently - but perhaps wrongly - implied to be clear in e.g.
>> hpet_set_mode(), in) hpet_enable()?
> 
> No, there is no particular reason why we don't clear those registers.

In that case I'll prepare a patch to do so. One related question is
whether use of the HPET should be suppressed when any bit unknown
to the kernel is found set, or whether unknown bits should also be
cleared.

Jan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hpet_disable() call sites
  2012-03-27 13:16   ` Jan Beulich
@ 2012-03-27 13:54     ` Thomas Gleixner
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2012-03-27 13:54 UTC (permalink / raw)
  To: Jan Beulich; +Cc: mingo, hirofumi, linux-kernel, hpa

On Tue, 27 Mar 2012, Jan Beulich wrote:
> >>> On 27.03.12 at 14:58, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Tue, 27 Mar 2012, Jan Beulich wrote:
> >> Is there any reason why hpet_disable() should not also be called
> >> from (or some equivalent action be taken, perhaps including clearing
> >> certain bits in the individual counters' configuration registers, which
> >> are apparently - but perhaps wrongly - implied to be clear in e.g.
> >> hpet_set_mode(), in) hpet_enable()?
> > 
> > No, there is no particular reason why we don't clear those registers.
> 
> In that case I'll prepare a patch to do so. One related question is
> whether use of the HPET should be suppressed when any bit unknown
> to the kernel is found set, or whether unknown bits should also be
> cleared.

Hmm. Good question. We might at least add a printk to alert about it.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-27 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27  8:19 hpet_disable() call sites Jan Beulich
2012-03-27 12:58 ` Thomas Gleixner
2012-03-27 13:16   ` Jan Beulich
2012-03-27 13:54     ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®