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.

linux/clocksource.h: Extract common header for vDSO

The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.

Split clocksource.h into linux and common headers to make the latter
suitable for inclusion in the vDSO library.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-9-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Thomas Gleixner
14ee2ac6 17e46656

+24 -10
+1 -10
include/linux/clocksource.h
··· 28 28 #include <asm/clocksource.h> 29 29 #endif 30 30 31 - enum vdso_clock_mode { 32 - VDSO_CLOCKMODE_NONE, 33 - #ifdef CONFIG_GENERIC_GETTIMEOFDAY 34 - VDSO_ARCH_CLOCKMODES, 35 - #endif 36 - VDSO_CLOCKMODE_MAX, 37 - 38 - /* Indicator for time namespace VDSO */ 39 - VDSO_CLOCKMODE_TIMENS = INT_MAX 40 - }; 31 + #include <vdso/clocksource.h> 41 32 42 33 /** 43 34 * struct clocksource - hardware abstraction for a free running counter
+23
include/vdso/clocksource.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __VDSO_CLOCKSOURCE_H 3 + #define __VDSO_CLOCKSOURCE_H 4 + 5 + #include <vdso/limits.h> 6 + 7 + #if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \ 8 + defined(CONFIG_GENERIC_GETTIMEOFDAY) 9 + #include <asm/vdso/clocksource.h> 10 + #endif /* CONFIG_ARCH_CLOCKSOURCE_DATA || CONFIG_GENERIC_GETTIMEOFDAY */ 11 + 12 + enum vdso_clock_mode { 13 + VDSO_CLOCKMODE_NONE, 14 + #ifdef CONFIG_GENERIC_GETTIMEOFDAY 15 + VDSO_ARCH_CLOCKMODES, 16 + #endif 17 + VDSO_CLOCKMODE_MAX, 18 + 19 + /* Indicator for time namespace VDSO */ 20 + VDSO_CLOCKMODE_TIMENS = INT_MAX 21 + }; 22 + 23 + #endif /* __VDSO_CLOCKSOURCE_H */