diff options
| author | Tony Luck <tony.luck@intel.com> | 2005-10-31 10:51:57 -0800 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2005-10-31 10:51:57 -0800 |
| commit | c7fb577e2a6cb04732541f2dc402bd46747f7558 (patch) | |
| tree | df3b1a1922ed13bfbcc45d08650c38beeb1a7bd1 /include/linux/timex.h | |
| parent | 9cec58dc138d6fcad9f447a19c8ff69f6540e667 (diff) | |
| parent | 581c1b14394aee60aff46ea67d05483261ed6527 (diff) | |
manual update from upstream:
Applied Al's change 06a544971fad0992fe8b92c5647538d573089dd4
to new location of swiotlb.c
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/linux/timex.h')
| -rw-r--r-- | include/linux/timex.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h index 7e050a2cc35b..04a4a8cb4ed3 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -282,6 +282,13 @@ static inline int ntp_synced(void) return !(time_status & STA_UNSYNC); } +/* Required to safely shift negative values */ +#define shift_right(x, s) ({ \ + __typeof__(x) __x = (x); \ + __typeof__(s) __s = (s); \ + __x < 0 ? -(-__x >> __s) : __x >> __s; \ +}) + #ifdef CONFIG_TIME_INTERPOLATION |
