From: Valentin Schneider Date: Wed, 13 Mar 2024 18:01:06 +0000 (+0100) Subject: x86/tsc: Make __use_tsc __ro_after_init X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=79a4567b2e8ae4d0282602a24f76f5e2382f5b98;p=linux.git x86/tsc: Make __use_tsc __ro_after_init __use_tsc is only ever enabled in __init tsc_enable_sched_clock(), so mark it as __ro_after_init. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Link: https://lore.kernel.org/r/20240313180106.2917308-5-vschneid@redhat.com --- diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 5a69a49acc963..0f7624ed1d1d0 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -44,7 +44,7 @@ EXPORT_SYMBOL(tsc_khz); static int __read_mostly tsc_unstable; static unsigned int __initdata tsc_early_khz; -static DEFINE_STATIC_KEY_FALSE(__use_tsc); +static DEFINE_STATIC_KEY_FALSE_RO(__use_tsc); int tsc_clocksource_reliable;