Re: Hungry for hardware timers

Clemens Ladisch
2010-09-07T10:54:44Z

Jaswinder Singh Rajput wrote:
> If I access /dev/hpet by hpet_example it shows that it is using HPET
> T0 as hi_hpet is 0 :
>
> #./hpet_example info /dev/hpet
> -hpet: executing info
> hpet_info: hi_irqfreq 0x0 hi_flags 0x0 hi_hpet 0 hi_timer 2

This means HPET block 0, timer 2. In practice, there is no machine with
more than one HPET block, so hi_hpet is rather useless.

> What will be IRQ # for T2.

Just check while hpet_example is running ...

> As per dmesg([ 0.325958] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0)
> so IRQs are like this :
> HPET T0 : 2
> HPET T1 : 8
> HPET T2 : 0

"0" means that the BIOS did not initialize it. In this case, the driver
will initializes it when accessed, with the first supported IRQ above 15.
On your HPET's T2, this is IRQ 20.

Regards,
Clemens