[PATCH 6/9] clocksource/drivers/mips-gic-timer: Only use VDSO_CLOCKMODE_GIC when it is a available
From: Thomas Weißschuh
Date: Thu May 21 2026 - 02:56:45 EST
VDSO_CLOCKMODE_GIC is only defined if CONFIG_GENERIC_GETTIMEOFDAY is
enabled. Right now this is always the case, but it will change soon.
Prepare for the potential unavailability of VDSO_CLOCKMODE_GIC.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
drivers/clocksource/mips-gic-timer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index 1501c7db9a8e..a1669266c94d 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -198,7 +198,9 @@ static struct clocksource gic_clocksource = {
.name = "GIC",
.read = gic_hpt_read,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
+#ifdef CONFIG_GENERIC_GETTIMEOFDAY
.vdso_clock_mode = VDSO_CLOCKMODE_GIC,
+#endif
};
static void gic_clocksource_unstable(char *reason)
--
2.54.0