UPSTREAM: hrtimer: Split out hrtimer defines into separate header
To avoid include dependency hell split out the hrtimer defines which are
required in the upcoming VDSO library into a separate header file.
[ tglx: Split out from the VDSO library patch and included ktime.h as
the new header depends on it. ]
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Shijith Thotton <sthotton@marvell.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Huw Davies <huw@codeweavers.com>
Link: https://lkml.kernel.org/r/20190621095252.32307-3-vincenzo.frascino@arm.com
(cherry picked from commit 32e29396f00e7849ea0b1aeebae097fc1de6e979)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I281e4031ba9360ac1ba5274fafd3787dc0588e64
This commit is contained in:
committed by
Alistair Delva
parent
e3db5d1536
commit
9a5558f323
@@ -15,8 +15,8 @@
|
||||
#ifndef _LINUX_HRTIMER_H
|
||||
#define _LINUX_HRTIMER_H
|
||||
|
||||
#include <linux/hrtimer_defs.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/percpu.h>
|
||||
@@ -301,26 +301,12 @@ struct clock_event_device;
|
||||
|
||||
extern void hrtimer_interrupt(struct clock_event_device *dev);
|
||||
|
||||
/*
|
||||
* The resolution of the clocks. The resolution value is returned in
|
||||
* the clock_getres() system call to give application programmers an
|
||||
* idea of the (in)accuracy of timers. Timer values are rounded up to
|
||||
* this resolution values.
|
||||
*/
|
||||
# define HIGH_RES_NSEC 1
|
||||
# define KTIME_HIGH_RES (HIGH_RES_NSEC)
|
||||
# define MONOTONIC_RES_NSEC HIGH_RES_NSEC
|
||||
# define KTIME_MONOTONIC_RES KTIME_HIGH_RES
|
||||
|
||||
extern void clock_was_set_delayed(void);
|
||||
|
||||
extern unsigned int hrtimer_resolution;
|
||||
|
||||
#else
|
||||
|
||||
# define MONOTONIC_RES_NSEC LOW_RES_NSEC
|
||||
# define KTIME_MONOTONIC_RES KTIME_LOW_RES
|
||||
|
||||
#define hrtimer_resolution (unsigned int)LOW_RES_NSEC
|
||||
|
||||
static inline void clock_was_set_delayed(void) { }
|
||||
|
||||
27
include/linux/hrtimer_defs.h
Normal file
27
include/linux/hrtimer_defs.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _LINUX_HRTIMER_DEFS_H
|
||||
#define _LINUX_HRTIMER_DEFS_H
|
||||
|
||||
#include <linux/ktime.h>
|
||||
|
||||
#ifdef CONFIG_HIGH_RES_TIMERS
|
||||
|
||||
/*
|
||||
* The resolution of the clocks. The resolution value is returned in
|
||||
* the clock_getres() system call to give application programmers an
|
||||
* idea of the (in)accuracy of timers. Timer values are rounded up to
|
||||
* this resolution values.
|
||||
*/
|
||||
# define HIGH_RES_NSEC 1
|
||||
# define KTIME_HIGH_RES (HIGH_RES_NSEC)
|
||||
# define MONOTONIC_RES_NSEC HIGH_RES_NSEC
|
||||
# define KTIME_MONOTONIC_RES KTIME_HIGH_RES
|
||||
|
||||
#else
|
||||
|
||||
# define MONOTONIC_RES_NSEC LOW_RES_NSEC
|
||||
# define KTIME_MONOTONIC_RES KTIME_LOW_RES
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user