summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/time.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2025-02-07 15:48:59 +0100
committerVasily Gorbik <gor@linux.ibm.com>2025-03-04 17:18:06 +0100
commitf931f67cfc274682aecc9f727eecc89779fc47b7 (patch)
tree4d92c5a78d8ca293f7c5bb44bf43cf1061a408c3 /arch/s390/kernel/time.c
parenta1a8da0dec77e0149b482698a2c1daab3a02ef7a (diff)
downloadlinux-f931f67cfc274682aecc9f727eecc89779fc47b7.tar.gz
linux-f931f67cfc274682aecc9f727eecc89779fc47b7.tar.bz2
linux-f931f67cfc274682aecc9f727eecc89779fc47b7.zip
s390/time: Convert MACHINE_HAS_SCC to machine_has_scc()
Use static branch(es) to implement and use machine_has_scc() instead of a runtime check via MACHINE_HAS_SCC. This comes with a cleanup of early time initialization: the initial tod_clock_base value is now passed via the bootdata mechanism, instead of using absolute lowcore as transport vehicle from the decompressor to the kernel. Also the early tod clock initialization is moved to the decompressor which allows to use a static branch with machine_has_scc() within the kernel. Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/time.c')
-rw-r--r--arch/s390/kernel/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index e9f47c3a6197..ac58b1db40e6 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -54,10 +54,10 @@
#include <asm/cio.h>
#include "entry.h"
-union tod_clock tod_clock_base __section(".data");
+union tod_clock __bootdata_preserved(tod_clock_base);
EXPORT_SYMBOL_GPL(tod_clock_base);
-u64 clock_comparator_max = -1ULL;
+u64 __bootdata_preserved(clock_comparator_max);
EXPORT_SYMBOL_GPL(clock_comparator_max);
static DEFINE_PER_CPU(struct clock_event_device, comparators);