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

linux/jiffies.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 jiffies.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-14-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Thomas Gleixner
97b01d2e b72a9c5e

+12 -3
+1 -3
include/linux/jiffies.h
··· 8 8 #include <linux/types.h> 9 9 #include <linux/time.h> 10 10 #include <linux/timex.h> 11 + #include <vdso/jiffies.h> 11 12 #include <asm/param.h> /* for HZ */ 12 13 #include <generated/timeconst.h> 13 14 ··· 59 58 #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ 60 59 61 60 extern int register_refined_jiffies(long clock_tick_rate); 62 - 63 - /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ 64 - #define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) 65 61 66 62 /* TICK_USEC is the time between ticks in usec assuming SHIFTED_HZ */ 67 63 #define TICK_USEC ((USEC_PER_SEC + HZ/2) / HZ)
+11
include/vdso/jiffies.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __VDSO_JIFFIES_H 3 + #define __VDSO_JIFFIES_H 4 + 5 + #include <asm/param.h> /* for HZ */ 6 + #include <vdso/time64.h> 7 + 8 + /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ 9 + #define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) 10 + 11 + #endif /* __VDSO_JIFFIES_H */