Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vt: Add a note on the historical abuse of CLOCK_TICK_RATE

This is one area where we can't just magic away the bizarre use of
CLOCK_TICK_RATE as it leaks to user space APIs. It also means the visible
CLOCK_TICK_RATE is frozen for architectures which is horrible.

We need to fix this somehow

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
fab89223 413f81eb

+6
+6
drivers/char/vt_ioctl.c
··· 400 400 case KIOCSOUND: 401 401 if (!perm) 402 402 goto eperm; 403 + /* FIXME: This is an old broken API but we need to keep it 404 + supported and somehow separate the historic advertised 405 + tick rate from any real one */ 403 406 if (arg) 404 407 arg = CLOCK_TICK_RATE / arg; 405 408 kd_mksound(arg, 0); ··· 420 417 */ 421 418 ticks = HZ * ((arg >> 16) & 0xffff) / 1000; 422 419 count = ticks ? (arg & 0xffff) : 0; 420 + /* FIXME: This is an old broken API but we need to keep it 421 + supported and somehow separate the historic advertised 422 + tick rate from any real one */ 423 423 if (count) 424 424 count = CLOCK_TICK_RATE / count; 425 425 kd_mksound(count, ticks);