• Arnd Bergmann's avatar
    Input: use PIT_TICK_RATE in vt beep ioctl · 2c4e9671
    Arnd Bergmann authored
    The KIOCSOUND and KDMKTONE ioctls are based on the CLOCK_TICK_RATE,
    which is architecture and sometimes configuration specific.
    
    In practice, most user applications assume that it is actually defined
    as the i8253 PIT base clock of 1193182 Hz, which is true on some
    architectures but not on others.
    
    This patch makes the vt code use the PIT frequency on all
    architectures, which is much more well-defined.  It will change the
    behavior of user applications sending the beep ioctl on all
    architectures that define CLOCK_TICK_RATE different from
    PIT_TICK_RATE.
    
    The original breakage was introduced in commit bcc8ca09 "Adapt
    drivers/char/vt_ioctl.c to non-x86".  Hopefully, reverting this change
    will make the frequency correct in more cases than it will make it
    incorrect.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
    Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
    2c4e9671
vt_ioctl.c 39.9 KB