diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-10 12:02:45 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-10 12:02:45 -0800 |
| commit | 58a14ee9c49aa2b9742c56a0477666335368e05e (patch) | |
| tree | 01dae0e9458eea6289f78bd21cea056798e5c75e /include | |
| parent | 712a30e63c8066ed84385b12edbfb804f49cbc44 (diff) | |
| parent | c289b074b66e2e59c65aba73f40b99e797e92d2f (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
hrtimer: don't modify restart_block->fn in restart functions
hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()
hrtimer: fix *rmtp handling in hrtimer_nanosleep()
ntp: correct inconsistent interval/tick_length usage
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/hrtimer.h | 2 | ||||
| -rw-r--r-- | include/linux/timex.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 600fc3bcf63e..1ad56a7b2f74 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -316,7 +316,7 @@ static inline u64 hrtimer_forward_now(struct hrtimer *timer, /* Precise sleep: */ extern long hrtimer_nanosleep(struct timespec *rqtp, - struct timespec *rmtp, + struct timespec __user *rmtp, const enum hrtimer_mode mode, const clockid_t clockid); extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); diff --git a/include/linux/timex.h b/include/linux/timex.h index 8ea3e71ba7fa..c3f374786a43 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -232,7 +232,14 @@ static inline int ntp_synced(void) #else #define NTP_INTERVAL_FREQ (HZ) #endif -#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) + +#define CLOCK_TICK_OVERFLOW (LATCH * HZ - CLOCK_TICK_RATE) +#define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / \ + (s64)CLOCK_TICK_RATE) + +/* Because using NSEC_PER_SEC would be too easy */ +#define NTP_INTERVAL_LENGTH ((((s64)TICK_USEC * NSEC_PER_USEC * USER_HZ) + \ + CLOCK_TICK_ADJUST) / NTP_INTERVAL_FREQ) /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ extern u64 current_tick_length(void); |
