From 5f5abb54048b5492c8173b073f9f0f8414a6bcbf Mon Sep 17 00:00:00 2001 From: Vincenzo Frascino Date: Fri, 20 Mar 2020 14:53:35 +0000 Subject: [PATCH] BACKPORT: linux/time.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 time.h into linux and common headers to make the latter suitable for inclusion in the vDSO library. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200320145351.32292-11-vincenzo.frascino@arm.com (cherry picked from commit 639fff1cce0f7462bb4440deeffc1048ecfc6ebb) Signed-off-by: Mark Salyzyn Bug: 154668398 Change-Id: Id860dccf0d8afea3d6f65a243ed8cdf1760ba789 --- include/linux/time.h | 3 +++ include/vdso/time.h | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 include/vdso/time.h diff --git a/include/linux/time.h b/include/linux/time.h index 5f3e49978837..47ed31fe5bb1 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -109,4 +109,7 @@ static inline bool itimerspec64_valid(const struct itimerspec64 *its) * Equivalent to !(time_before32(@t, @l) || time_after32(@t, @h)). */ #define time_between32(t, l, h) ((u32)(h) - (u32)(l) >= (u32)(t) - (u32)(l)) + +# include + #endif diff --git a/include/vdso/time.h b/include/vdso/time.h new file mode 100644 index 000000000000..e5afa84b47b4 --- /dev/null +++ b/include/vdso/time.h @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __VDSO_TIME_H +#define __VDSO_TIME_H + +#endif /* __VDSO_TIME_H */