Skip to contentSkip to conversation

Add __percpu type tag to xnclock::timerdata

PATCH New Jan Kiszka 1 participant 1 message Sep 4, 2025

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Add __percpu type tag to xnclock::timerdata

From: Jan Kiszka <[email protected]>

This is needed for recent kernels (6.16, maybe earlier) and compilers (gcc-14, maybe earlier) because they perform a per-cpu address space check. So far, only sparse should have found this.

---
 include/cobalt/kernel/clock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/cobalt/kernel/clock.h +1 -1
index 2f7b714046..63841b96ca 100644
@@ -78,7 +78,7 @@ struct xnclock {
 #endif
 	} ops;
 	/* Private section. */
-	struct xntimerdata *timerdata;
+	struct xntimerdata __percpu *timerdata;
 	int id;
 #ifdef CONFIG_SMP
 	/** Possible CPU affinity of clock beat. */
Signature · 1 line
2.43.0