diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2008-05-01 07:34:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-01 11:03:59 -0400 |
commit | 153b5d054ac2d98ea0d86504884326b6777f683d (patch) | |
tree | 0512b4239959814a6cc6aa6c9e77abc36d3ab2f0 /include/linux | |
parent | 9f14f669d18477fe3df071e2fa4da36c00acee8e (diff) |
ntp: support for TAI
This adds support for setting the TAI value (International Atomic Time). The
value is reported back to userspace via timex (as we don't have a
ntp_gettime() syscall).
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/compat.h | 3 | ||||
-rw-r--r-- | include/linux/timex.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 8fa7857e153b..cf8d11cad5ae 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -65,10 +65,11 @@ struct compat_timex { | |||
65 | compat_long_t calcnt; | 65 | compat_long_t calcnt; |
66 | compat_long_t errcnt; | 66 | compat_long_t errcnt; |
67 | compat_long_t stbcnt; | 67 | compat_long_t stbcnt; |
68 | compat_int_t tai; | ||
68 | 69 | ||
69 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; | 70 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; |
70 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; | 71 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; |
71 | compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32; | 72 | compat_int_t :32; compat_int_t :32; compat_int_t :32; |
72 | }; | 73 | }; |
73 | 74 | ||
74 | #define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) | 75 | #define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW) |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 9fbdd12a52f1..6ff92237759a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -121,9 +121,11 @@ struct timex { | |||
121 | long errcnt; /* calibration errors (ro) */ | 121 | long errcnt; /* calibration errors (ro) */ |
122 | long stbcnt; /* stability limit exceeded (ro) */ | 122 | long stbcnt; /* stability limit exceeded (ro) */ |
123 | 123 | ||
124 | int tai; /* TAI offset (ro) */ | ||
125 | |||
124 | int :32; int :32; int :32; int :32; | 126 | int :32; int :32; int :32; int :32; |
125 | int :32; int :32; int :32; int :32; | 127 | int :32; int :32; int :32; int :32; |
126 | int :32; int :32; int :32; int :32; | 128 | int :32; int :32; int :32; |
127 | }; | 129 | }; |
128 | 130 | ||
129 | /* | 131 | /* |
@@ -135,6 +137,7 @@ struct timex { | |||
135 | #define ADJ_ESTERROR 0x0008 /* estimated time error */ | 137 | #define ADJ_ESTERROR 0x0008 /* estimated time error */ |
136 | #define ADJ_STATUS 0x0010 /* clock status */ | 138 | #define ADJ_STATUS 0x0010 /* clock status */ |
137 | #define ADJ_TIMECONST 0x0020 /* pll time constant */ | 139 | #define ADJ_TIMECONST 0x0020 /* pll time constant */ |
140 | #define ADJ_TAI 0x0080 /* set TAI offset */ | ||
138 | #define ADJ_MICRO 0x1000 /* select microsecond resolution */ | 141 | #define ADJ_MICRO 0x1000 /* select microsecond resolution */ |
139 | #define ADJ_NANO 0x2000 /* select nanosecond resolution */ | 142 | #define ADJ_NANO 0x2000 /* select nanosecond resolution */ |
140 | #define ADJ_TICK 0x4000 /* tick value */ | 143 | #define ADJ_TICK 0x4000 /* tick value */ |