Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <asm/vdso/clocksource.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~

Fix the issue removing the unneeded config condition.

Fixes: 14ee2ac618e4 ("linux/clocksource.h: Extract common header for vDSO")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200323133920.46546-1-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Borislav Petkov
ca214e2c 1c1a18b0

+2 -3
+2 -3
include/vdso/clocksource.h
··· 4 4 5 5 #include <vdso/limits.h> 6 6 7 - #if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \ 8 - defined(CONFIG_GENERIC_GETTIMEOFDAY) 7 + #ifdef CONFIG_GENERIC_GETTIMEOFDAY 9 8 #include <asm/vdso/clocksource.h> 10 - #endif /* CONFIG_ARCH_CLOCKSOURCE_DATA || CONFIG_GENERIC_GETTIMEOFDAY */ 9 + #endif /* CONFIG_GENERIC_GETTIMEOFDAY */ 11 10 12 11 enum vdso_clock_mode { 13 12 VDSO_CLOCKMODE_NONE,