From ca214e2c1793058e3a1387f9e343cc5b1731db15 Mon Sep 17 00:00:00 2001 From: Vincenzo Frascino Date: Mon, 23 Mar 2020 13:39:20 +0000 Subject: vdso: Fix clocksource.h macro detection CONFIG_GENERIC_GETTIMEOFDAY is a sufficient condition to verify if an architecture implements asm/vdso/clocksource.h or not. The current implementation wrongly assumes that the same is true for the config option CONFIG_ARCH_CLOCKSOURCE_DATA. This results in a series of build errors on ia64/sparc/sparc64 like this: In file included from ./include/linux/clocksource.h:31, from ./include/linux/clockchips.h:14, from ./include/linux/tick.h:8, from fs/proc/stat.c:15: ./include/vdso/clocksource.h:9:10: fatal error: asm/vdso/clocksource.h: No such file or directory 9 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~ Fix the issue removing the unneeded config condition. Fixes: 14ee2ac618e4 ("linux/clocksource.h: Extract common header for vDSO") Reported-by: Thomas Gleixner Signed-off-by: Vincenzo Frascino Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200323133920.46546-1-vincenzo.frascino@arm.com --- include/vdso/clocksource.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/vdso') diff --git a/include/vdso/clocksource.h b/include/vdso/clocksource.h index ab58330e4e5d..c682e7c60273 100644 --- a/include/vdso/clocksource.h +++ b/include/vdso/clocksource.h @@ -4,10 +4,9 @@ #include -#if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \ - defined(CONFIG_GENERIC_GETTIMEOFDAY) +#ifdef CONFIG_GENERIC_GETTIMEOFDAY #include -#endif /* CONFIG_ARCH_CLOCKSOURCE_DATA || CONFIG_GENERIC_GETTIMEOFDAY */ +#endif /* CONFIG_GENERIC_GETTIMEOFDAY */ enum vdso_clock_mode { VDSO_CLOCKMODE_NONE, -- cgit v1.2.3-59-g8ed1b