Skip to content

Commit a67de48

Browse files
thule-vincenzoKAGA-KOKO
authored andcommitted
clocksource/drivers/arm_arch_timer: Fix vDSO clockmode when vDSO disabled
The arm_arch_timer requires VDSO_CLOCKMODE_ARCHTIMER to be defined to compile correctly. On ARM the vDSO can be disabled and when this is the case the compilation ends prematurely with an error: $ make ARCH=arm multi_v7_defconfig $ ./scripts/config -d VDSO $ make drivers/clocksource/arm_arch_timer.c:73:44: error: ‘VDSO_CLOCKMODE_ARCHTIMER’ undeclared here (not in a function) static enum vdso_clock_mode vdso_default = VDSO_CLOCKMODE_ARCHTIMER; Make the usage of VDSO_CLOCKMODE_ARCHTIMER depend on the VDSO enablement and initialize the vdso clockmode variable with VDSO_CLOCKMODE_NONE otherwise. [ tglx: Match changelog and patch content. ] Fixes: 5e3c6a3 ("ARM/arm64: vdso: Use common vdso clock mode storage") Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200224151552.57274-1-vincenzo.frascino@arm.com
1 parent 5fb1c2a commit a67de48

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/clocksource/arm_arch_timer.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ static enum arch_timer_ppi_nr arch_timer_uses_ppi = ARCH_TIMER_VIRT_PPI;
6969
static bool arch_timer_c3stop;
7070
static bool arch_timer_mem_use_virtual;
7171
static bool arch_counter_suspend_stop;
72+
#ifdef CONFIG_GENERIC_GETTIMEOFDAY
7273
static enum vdso_clock_mode vdso_default = VDSO_CLOCKMODE_ARCHTIMER;
74+
#else
75+
static enum vdso_clock_mode vdso_default = VDSO_CLOCKMODE_NONE;
76+
#endif /* CONFIG_GENERIC_GETTIMEOFDAY */
7377

7478
static cpumask_t evtstrm_available = CPU_MASK_NONE;
7579
static bool evtstrm_enable = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EVTSTREAM);

0 commit comments

Comments
 (0)