diff mbox series

[v4,15/30] sched/clock: Mark sched_clock_running key as __ro_after_init

Message ID 20250114175143.81438-16-vschneid@redhat.com (mailing list archive)
State Handled Elsewhere
Headers show
Series context_tracking,x86: Defer some IPIs until a user->kernel transition | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-15-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 139.42s
conchuod/patch-15-test-2 fail .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1008.06s
conchuod/patch-15-test-3 fail .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1232.80s
conchuod/patch-15-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 21.20s
conchuod/patch-15-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 23.27s
conchuod/patch-15-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.46s
conchuod/patch-15-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 43.62s
conchuod/patch-15-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.01s
conchuod/patch-15-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.55s
conchuod/patch-15-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-15-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-15-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.04s

Commit Message

Valentin Schneider Jan. 14, 2025, 5:51 p.m. UTC
sched_clock_running is only ever enabled in the __init functions
sched_clock_init() and sched_clock_init_late(), and is never disabled. Mark
it __ro_after_init.

Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
 kernel/sched/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
index a09655b481402..200e5568b9894 100644
--- a/kernel/sched/clock.c
+++ b/kernel/sched/clock.c
@@ -66,7 +66,7 @@  notrace unsigned long long __weak sched_clock(void)
 }
 EXPORT_SYMBOL_GPL(sched_clock);
 
-static DEFINE_STATIC_KEY_FALSE(sched_clock_running);
+static DEFINE_STATIC_KEY_FALSE_RO(sched_clock_running);
 
 #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
 /*