lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 23 Jun 2019 16:43:32 -0700
From:   tip-bot for Vincenzo Frascino <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     salyzyn@...roid.com, ralf@...ux-mips.org, 0x7f454c46@...il.com,
        hpa@...or.com, daniel.lezcano@...aro.org, linux@...musvillemoes.dk,
        sthotton@...vell.com, paul.burton@...s.com, huw@...eweavers.com,
        tglx@...utronix.de, vincenzo.frascino@....com,
        catalin.marinas@....com, will.deacon@....com, pcc@...gle.com,
        arnd@...db.de, linux@...linux.org.uk, andre.przywara@....com,
        shuah@...nel.org, linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: [tip:timers/vdso] hrtimer: Split out hrtimer defines into separate
 header

Commit-ID:  32e29396f00e7849ea0b1aeebae097fc1de6e979
Gitweb:     https://git.kernel.org/tip/32e29396f00e7849ea0b1aeebae097fc1de6e979
Author:     Vincenzo Frascino <vincenzo.frascino@....com>
AuthorDate: Sat, 22 Jun 2019 15:02:07 +0200
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 22 Jun 2019 21:21:04 +0200

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@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Shijith Thotton <sthotton@...vell.com>
Tested-by: Andre Przywara <andre.przywara@....com>
Cc: linux-arch@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-mips@...r.kernel.org
Cc: linux-kselftest@...r.kernel.org
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Russell King <linux@...linux.org.uk>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Paul Burton <paul.burton@...s.com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Mark Salyzyn <salyzyn@...roid.com>
Cc: Peter Collingbourne <pcc@...gle.com>
Cc: Shuah Khan <shuah@...nel.org>
Cc: Dmitry Safonov <0x7f454c46@...il.com>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Huw Davies <huw@...eweavers.com>
Link: https://lkml.kernel.org/r/20190621095252.32307-3-vincenzo.frascino@arm.com
---
 include/linux/hrtimer.h      | 16 +---------------
 include/linux/hrtimer_defs.h | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 2e8957eac4d4..4971100a8cab 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -12,8 +12,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>
@@ -298,26 +298,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) { }
diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h
new file mode 100644
index 000000000000..2d3e3c5fb946
--- /dev/null
+++ b/include/linux/hrtimer_defs.h
@@ -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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ