diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clocksource.h | 3 | ||||
| -rw-r--r-- | include/linux/time.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index f0a7fb984413..f88d32f8ff7c 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -79,6 +79,7 @@ struct clocksource { | |||
| 79 | /* timekeeping specific data, ignore */ | 79 | /* timekeeping specific data, ignore */ |
| 80 | cycle_t cycle_interval; | 80 | cycle_t cycle_interval; |
| 81 | u64 xtime_interval; | 81 | u64 xtime_interval; |
| 82 | u32 raw_interval; | ||
| 82 | /* | 83 | /* |
| 83 | * Second part is written at each timer interrupt | 84 | * Second part is written at each timer interrupt |
| 84 | * Keep it in a different cache line to dirty no | 85 | * Keep it in a different cache line to dirty no |
| @@ -87,6 +88,7 @@ struct clocksource { | |||
| 87 | cycle_t cycle_last ____cacheline_aligned_in_smp; | 88 | cycle_t cycle_last ____cacheline_aligned_in_smp; |
| 88 | u64 xtime_nsec; | 89 | u64 xtime_nsec; |
| 89 | s64 error; | 90 | s64 error; |
| 91 | struct timespec raw_time; | ||
| 90 | 92 | ||
| 91 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 93 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
| 92 | /* Watchdog related data, used by the framework */ | 94 | /* Watchdog related data, used by the framework */ |
| @@ -215,6 +217,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c, | |||
| 215 | 217 | ||
| 216 | /* Go back from cycles -> shifted ns, this time use ntp adjused mult */ | 218 | /* Go back from cycles -> shifted ns, this time use ntp adjused mult */ |
| 217 | c->xtime_interval = (u64)c->cycle_interval * c->mult; | 219 | c->xtime_interval = (u64)c->cycle_interval * c->mult; |
| 220 | c->raw_interval = ((u64)c->cycle_interval * c->mult_orig) >> c->shift; | ||
| 218 | } | 221 | } |
| 219 | 222 | ||
| 220 | 223 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index e15206a7e82e..205f974b9ebf 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -117,6 +117,7 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
| 117 | extern unsigned int alarm_setitimer(unsigned int seconds); | 117 | extern unsigned int alarm_setitimer(unsigned int seconds); |
| 118 | extern int do_getitimer(int which, struct itimerval *value); | 118 | extern int do_getitimer(int which, struct itimerval *value); |
| 119 | extern void getnstimeofday(struct timespec *tv); | 119 | extern void getnstimeofday(struct timespec *tv); |
| 120 | extern void getrawmonotonic(struct timespec *ts); | ||
| 120 | extern void getboottime(struct timespec *ts); | 121 | extern void getboottime(struct timespec *ts); |
| 121 | extern void monotonic_to_bootbased(struct timespec *ts); | 122 | extern void monotonic_to_bootbased(struct timespec *ts); |
| 122 | 123 | ||
| @@ -214,6 +215,7 @@ struct itimerval { | |||
| 214 | #define CLOCK_MONOTONIC 1 | 215 | #define CLOCK_MONOTONIC 1 |
| 215 | #define CLOCK_PROCESS_CPUTIME_ID 2 | 216 | #define CLOCK_PROCESS_CPUTIME_ID 2 |
| 216 | #define CLOCK_THREAD_CPUTIME_ID 3 | 217 | #define CLOCK_THREAD_CPUTIME_ID 3 |
| 218 | #define CLOCK_MONOTONIC_RAW 4 | ||
| 217 | 219 | ||
| 218 | /* | 220 | /* |
| 219 | * The IDs of various hardware clocks: | 221 | * The IDs of various hardware clocks: |
