diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-19 22:05:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-19 22:05:45 -0500 |
commit | 266d7ad7f4fe2f44b91561f5b812115c1b3018ab (patch) | |
tree | 45acf12d5cb170205ccffe24b9f24672ff8bff2e /include | |
parent | bcbd818c069b9e1bf82517401225b152a33968e2 (diff) | |
parent | 36dfbbf136db0d645bacfd42ce7d9d6928ea532d (diff) |
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer changes from Ingo Molnar:
"Main changes:
- ntp: Add CONFIG_RTC_SYSTOHC: a generic RTC driver facility
complementing the existing CONFIG_RTC_HCTOSYS, which uses NTP to
keep the hardware clock updated.
- posix-timers: Fix clock_adjtime to always return timex data on
success. This is changing the ABI, but no breakage was expected
and found - caution is warranted nevertheless.
- platform persistent clock improvements/cleanups.
- clockevents: refactor timer broadcast handling to be more generic
and less duplicated with matching architecture code (mostly ARM
motivated.)
- various fixes and cleanups"
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timers/x86/hpet: Use HPET_COUNTER to specify the hpet counter in vread_hpet()
posix-cpu-timers: Fix nanosleep task_struct leak
clockevents: Fix generic broadcast for FEAT_C3STOP
time, Fix setting of hardware clock in NTP code
hrtimer: Prevent hrtimer_enqueue_reprogram race
clockevents: Add generic timer broadcast function
clockevents: Add generic timer broadcast receiver
timekeeping: Switch HAS_PERSISTENT_CLOCK to ALWAYS_USE_PERSISTENT_CLOCK
x86/time/rtc: Don't print extended CMOS year when reading RTC
x86: Select HAS_PERSISTENT_CLOCK on x86
timekeeping: Add CONFIG_HAS_PERSISTENT_CLOCK option
rtc: Skip the suspend/resume handling if persistent clock exist
timekeeping: Add persistent_clock_exist flag
posix-timers: Fix clock_adjtime to always return timex data on success
Round the calculated scale factor in set_cyc2ns_scale()
NTP: Add a CONFIG_RTC_SYSTOHC configuration
MAINTAINERS: Update John Stultz's email
time: create __getnstimeofday for WARNless calls
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clockchips.h | 9 | ||||
-rw-r--r-- | include/linux/rtc.h | 1 | ||||
-rw-r--r-- | include/linux/time.h | 13 |
3 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 8a7096fcb01e..66346521cb65 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -161,6 +161,15 @@ clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec) | |||
161 | extern void clockevents_suspend(void); | 161 | extern void clockevents_suspend(void); |
162 | extern void clockevents_resume(void); | 162 | extern void clockevents_resume(void); |
163 | 163 | ||
164 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | ||
165 | #ifdef CONFIG_ARCH_HAS_TICK_BROADCAST | ||
166 | extern void tick_broadcast(const struct cpumask *mask); | ||
167 | #else | ||
168 | #define tick_broadcast NULL | ||
169 | #endif | ||
170 | extern int tick_receive_broadcast(void); | ||
171 | #endif | ||
172 | |||
164 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 173 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
165 | extern void clockevents_notify(unsigned long reason, void *arg); | 174 | extern void clockevents_notify(unsigned long reason, void *arg); |
166 | #else | 175 | #else |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 9531845c419f..11d05f9fe8b6 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -138,6 +138,7 @@ extern void rtc_device_unregister(struct rtc_device *rtc); | |||
138 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 138 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
139 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 139 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
140 | extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); | 140 | extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); |
141 | extern int rtc_set_ntp_time(struct timespec now); | ||
141 | int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); | 142 | int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); |
142 | extern int rtc_read_alarm(struct rtc_device *rtc, | 143 | extern int rtc_read_alarm(struct rtc_device *rtc, |
143 | struct rtc_wkalrm *alrm); | 144 | struct rtc_wkalrm *alrm); |
diff --git a/include/linux/time.h b/include/linux/time.h index 4d358e9d10f1..a3ab6a814a9c 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -115,8 +115,20 @@ static inline bool timespec_valid_strict(const struct timespec *ts) | |||
115 | return true; | 115 | return true; |
116 | } | 116 | } |
117 | 117 | ||
118 | extern bool persistent_clock_exist; | ||
119 | |||
120 | #ifdef ALWAYS_USE_PERSISTENT_CLOCK | ||
121 | #define has_persistent_clock() true | ||
122 | #else | ||
123 | static inline bool has_persistent_clock(void) | ||
124 | { | ||
125 | return persistent_clock_exist; | ||
126 | } | ||
127 | #endif | ||
128 | |||
118 | extern void read_persistent_clock(struct timespec *ts); | 129 | extern void read_persistent_clock(struct timespec *ts); |
119 | extern void read_boot_clock(struct timespec *ts); | 130 | extern void read_boot_clock(struct timespec *ts); |
131 | extern int persistent_clock_is_local; | ||
120 | extern int update_persistent_clock(struct timespec now); | 132 | extern int update_persistent_clock(struct timespec now); |
121 | void timekeeping_init(void); | 133 | void timekeeping_init(void); |
122 | extern int timekeeping_suspended; | 134 | extern int timekeeping_suspended; |
@@ -158,6 +170,7 @@ extern int do_setitimer(int which, struct itimerval *value, | |||
158 | struct itimerval *ovalue); | 170 | struct itimerval *ovalue); |
159 | extern unsigned int alarm_setitimer(unsigned int seconds); | 171 | extern unsigned int alarm_setitimer(unsigned int seconds); |
160 | extern int do_getitimer(int which, struct itimerval *value); | 172 | extern int do_getitimer(int which, struct itimerval *value); |
173 | extern int __getnstimeofday(struct timespec *tv); | ||
161 | extern void getnstimeofday(struct timespec *tv); | 174 | extern void getnstimeofday(struct timespec *tv); |
162 | extern void getrawmonotonic(struct timespec *ts); | 175 | extern void getrawmonotonic(struct timespec *ts); |
163 | extern void getnstime_raw_and_real(struct timespec *ts_raw, | 176 | extern void getnstime_raw_and_real(struct timespec *ts_raw, |