Thread (42 messages) flat view 42 messages, 3 authors, 2025-06-14
STALE419d LANDED

Landed in mainline as 506a54a0316e on 2025-06-19.

[patch V2 02/26] timekeeping: Cleanup kernel doc of __ktime_get_real_seconds()

From: Thomas Gleixner <hidden>
Date: 2025-05-19 08:33:18
Also in: lkml

Signed-off-by: Thomas Gleixner <redacted>
---
 kernel/time/timekeeping.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -975,9 +975,14 @@ time64_t ktime_get_real_seconds(void)
 EXPORT_SYMBOL_GPL(ktime_get_real_seconds);
 
 /**
- * __ktime_get_real_seconds - The same as ktime_get_real_seconds
- * but without the sequence counter protect. This internal function
- * is called just when timekeeping lock is already held.
+ * __ktime_get_real_seconds - Unprotected access to CLOCK_REALTIME seconds
+ *
+ * The same as ktime_get_real_seconds() but without the sequence counter
+ * protection. This function is used in restricted contexts like the x86 MCE
+ * handler and in KGDB. It's unprotected on 32-bit vs. concurrent half
+ * completed modification and only to be used for such critical contexts.
+ *
+ * Returns: Racy snapshot of the CLOCK_REALTIME seconds value
  */
 noinstr time64_t __ktime_get_real_seconds(void)
 {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help