s390/time: improve steering precision
authorSven Schnelle <svens@linux.ibm.com>
Thu, 14 Sep 2023 06:58:54 +0000 (08:58 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 9 Feb 2024 12:58:14 +0000 (13:58 +0100)
The common timekeeping code steers the clock by adjusting the multiplier
value of the clock. With the current value of 1000 precision is lost
when the clock is steered with a userspace daemon. Increase the multiplier
and the shift values to increase precision.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/time.c

index 14abad953c0252e63fc34ce5dbc3c3a6c7d6e390..8357306fb76e7d720a4b28055156e8dd1367aecc 100644 (file)
@@ -251,8 +251,8 @@ static struct clocksource clocksource_tod = {
        .rating         = 400,
        .read           = read_tod_clock,
        .mask           = CLOCKSOURCE_MASK(64),
-       .mult           = 1000,
-       .shift          = 12,
+       .mult           = 4096000,
+       .shift          = 24,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
        .vdso_clock_mode = VDSO_CLOCKMODE_TOD,
 };