aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-13 18:31:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-13 18:31:21 -0400
commitd55e5bd0201a2af0182687882a92c5f95dbccc12 (patch)
tree858da1717cd4491afeffd55791ea6b607062a7cd /include
parent5651721edec25bf73cee060150e684044eac42dc (diff)
parent5baefd6d84163443215f4a99f6a20f054ef11236 (diff)
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull the leap second fixes from Thomas Gleixner: "It's a rather large series, but well discussed, refined and reviewed. It got a massive testing by John, Prarit and tip. In theory we could split it into two parts. The first two patches f55a6faa3843: hrtimer: Provide clock_was_set_delayed() 4873fa070ae8: timekeeping: Fix leapsecond triggered load spike issue are merely preventing the stuff loops forever issues, which people have observed. But there is no point in delaying the other 4 commits which achieve full correctness into 3.6 as they are tagged for stable anyway. And I rather prefer to have the full fixes merged in bulk than a "prevent the observable wreckage and deal with the hidden fallout later" approach." * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hrtimer: Update hrtimer base offsets each hrtimer_interrupt timekeeping: Provide hrtimer update function hrtimers: Move lock held region in hrtimer_interrupt() timekeeping: Maintain ktime_t based offsets for hrtimers timekeeping: Fix leapsecond triggered load spike issue hrtimer: Provide clock_was_set_delayed()
Diffstat (limited to 'include')
-rw-r--r--include/linux/hrtimer.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index fd0dc30c9f1..cc07d2777bb 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -165,6 +165,7 @@ enum hrtimer_base_type {
165 * @lock: lock protecting the base and associated clock bases 165 * @lock: lock protecting the base and associated clock bases
166 * and timers 166 * and timers
167 * @active_bases: Bitfield to mark bases with active timers 167 * @active_bases: Bitfield to mark bases with active timers
168 * @clock_was_set: Indicates that clock was set from irq context.
168 * @expires_next: absolute time of the next event which was scheduled 169 * @expires_next: absolute time of the next event which was scheduled
169 * via clock_set_next_event() 170 * via clock_set_next_event()
170 * @hres_active: State of high resolution mode 171 * @hres_active: State of high resolution mode
@@ -177,7 +178,8 @@ enum hrtimer_base_type {
177 */ 178 */
178struct hrtimer_cpu_base { 179struct hrtimer_cpu_base {
179 raw_spinlock_t lock; 180 raw_spinlock_t lock;
180 unsigned long active_bases; 181 unsigned int active_bases;
182 unsigned int clock_was_set;
181#ifdef CONFIG_HIGH_RES_TIMERS 183#ifdef CONFIG_HIGH_RES_TIMERS
182 ktime_t expires_next; 184 ktime_t expires_next;
183 int hres_active; 185 int hres_active;
@@ -286,6 +288,8 @@ extern void hrtimer_peek_ahead_timers(void);
286# define MONOTONIC_RES_NSEC HIGH_RES_NSEC 288# define MONOTONIC_RES_NSEC HIGH_RES_NSEC
287# define KTIME_MONOTONIC_RES KTIME_HIGH_RES 289# define KTIME_MONOTONIC_RES KTIME_HIGH_RES
288 290
291extern void clock_was_set_delayed(void);
292
289#else 293#else
290 294
291# define MONOTONIC_RES_NSEC LOW_RES_NSEC 295# define MONOTONIC_RES_NSEC LOW_RES_NSEC
@@ -306,6 +310,9 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer)
306{ 310{
307 return 0; 311 return 0;
308} 312}
313
314static inline void clock_was_set_delayed(void) { }
315
309#endif 316#endif
310 317
311extern void clock_was_set(void); 318extern void clock_was_set(void);
@@ -320,6 +327,7 @@ extern ktime_t ktime_get(void);
320extern ktime_t ktime_get_real(void); 327extern ktime_t ktime_get_real(void);
321extern ktime_t ktime_get_boottime(void); 328extern ktime_t ktime_get_boottime(void);
322extern ktime_t ktime_get_monotonic_offset(void); 329extern ktime_t ktime_get_monotonic_offset(void);
330extern ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot);
323 331
324DECLARE_PER_CPU(struct tick_device, tick_cpu_device); 332DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
325 333