aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/asm-offsets.c2
-rw-r--r--include/linux/hrtimer.h5
-rw-r--r--include/linux/ktime.h3
3 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index e6e49289f788..4b749c416464 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -313,7 +313,7 @@ int main(void)
313 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); 313 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
314 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); 314 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
315 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC); 315 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
316 DEFINE(CLOCK_REALTIME_RES, (KTIME_MONOTONIC_RES).tv64); 316 DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
317 317
318#ifdef CONFIG_BUG 318#ifdef CONFIG_BUG
319 DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry)); 319 DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 8371b664b41f..203591e23210 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -225,11 +225,14 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer)
225 * idea of the (in)accuracy of timers. Timer values are rounded up to 225 * idea of the (in)accuracy of timers. Timer values are rounded up to
226 * this resolution values. 226 * this resolution values.
227 */ 227 */
228# define KTIME_HIGH_RES (ktime_t) { .tv64 = 1 } 228# define HIGH_RES_NSEC 1
229# define KTIME_HIGH_RES (ktime_t) { .tv64 = HIGH_RES_NSEC }
230# define MONOTONIC_RES_NSEC HIGH_RES_NSEC
229# define KTIME_MONOTONIC_RES KTIME_HIGH_RES 231# define KTIME_MONOTONIC_RES KTIME_HIGH_RES
230 232
231#else 233#else
232 234
235# define MONOTONIC_RES_NSEC LOW_RES_NSEC
233# define KTIME_MONOTONIC_RES KTIME_LOW_RES 236# define KTIME_MONOTONIC_RES KTIME_LOW_RES
234 237
235/* 238/*
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index a6ddec141f96..36c542b70c6d 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -316,7 +316,8 @@ static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec)
316 * idea of the (in)accuracy of timers. Timer values are rounded up to 316 * idea of the (in)accuracy of timers. Timer values are rounded up to
317 * this resolution values. 317 * this resolution values.
318 */ 318 */
319#define KTIME_LOW_RES (ktime_t){ .tv64 = TICK_NSEC } 319#define LOW_RES_NSEC TICK_NSEC
320#define KTIME_LOW_RES (ktime_t){ .tv64 = LOW_RES_NSEC }
320 321
321/* Get the monotonic time in timespec format: */ 322/* Get the monotonic time in timespec format: */
322extern void ktime_get_ts(struct timespec *ts); 323extern void ktime_get_ts(struct timespec *ts);