• David Brownell's avatar
    hpet: /dev/hpet - fixes and cleanup · 64a76f66
    David Brownell authored
    Minor /dev/hpet updates and bugfixes:
    
      * Remove dead code, mostly remnants of an incomplete/unusable
        kernel interface ... noted when addressing "sparse" warnings:
          + hpet_unregister() and a routine it calls
          + hpet_task and all references, including hpet_task_lock
          + hpet_data.hd_flags (and HPET_DATA_PLATFORM)
    
      * Correct and improve boot message:
          + displays *counter* (shared between comparators) bit width,
            not *timer* bit widths (which are often mixed)
          + relabel "timers" as "comparators"; this is less confusing,
            they are not independent like normal timers are (sigh)
          + display MHz not Hz; it's never less than 10 MHz.
    
      * Tighten and correct the userspace interface code
          + don't accidentally program comparators in 64-bit mode using
            32-bit values ... always force comparators into 32-bit mode
          + provide the correct bit definition flagging comparators with
            periodic capability ... the ABI is unchanged
    
      * Update Documentation/hpet.txt
          + be more correct and current
          + expand description a bit
          + don't mention that now-gone kernel interface
    
    Plus, add a FIXME comment for something that could cause big trouble
    on systems with more capable HPETs than at least Intel seems to ship.
    
    It seems that few folk use this userspace interface; it's not very
    usable given the general lack of HPET IRQ routing.  I'm told that
    the only real point of it any more is to mmap for fast timestamps;
    IMO that's handled better through the gettimeofday() vsyscall.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Acked-by: default avatarClemens Ladisch <clemens@ladisch.de>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    64a76f66
hpet.txt 6.39 KB