]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/drivers/arm_arch_timer: Fix vDSO clockmode when vDSO disabled
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Mon, 24 Feb 2020 15:15:52 +0000 (15:15 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 25 Feb 2020 21:08:39 +0000 (22:08 +0100)
commited34134be5e02690b31a6d2fb5c381758593fe63
tree16223a78d14382255939f6e9997aa67f50800041
parentf953bdb30bedda90babe4e4c0d641085e83f9ebd
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: 77230964fffb ("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
drivers/clocksource/arm_arch_timer.c