diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:11:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 20:11:10 -0400 |
commit | 164d44fd92e79d5bce54d0d62df9f856f7b23925 (patch) | |
tree | 9f21607849b7e684b255578ffdf41951bc31787e /include | |
parent | 5bfec46baa3a752393433b8d89d3b2c70820f61d (diff) | |
parent | d7e81c269db899b800e0963dc4aceece1f82a680 (diff) |
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource: Add clocksource_register_hz/khz interface
posix-cpu-timers: Optimize run_posix_cpu_timers()
time: Remove xtime_cache
mqueue: Convert message queue timeout to use hrtimers
hrtimers: Provide schedule_hrtimeout for CLOCK_REALTIME
timers: Introduce the concept of timer slack for legacy timers
ntp: Remove tickadj
ntp: Make time_adjust static
time: Add xtime, wall_to_monotonic to feature-removal-schedule
timer: Try to survive timer callback preempt_count leak
timer: Split out timer function call
timer: Print function name for timer callbacks modifying preemption count
time: Clean up warp_clock()
cpu-timers: Avoid iterating over all threads in fastpath_timer_check()
cpu-timers: Change SIGEV_NONE timer implementation
cpu-timers: Return correct previous timer reload value
cpu-timers: Cleanup arm_timer()
cpu-timers: Simplify RLIMIT_CPU handling
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clocksource.h | 19 | ||||
-rw-r--r-- | include/linux/hrtimer.h | 2 | ||||
-rw-r--r-- | include/linux/time.h | 1 | ||||
-rw-r--r-- | include/linux/timer.h | 10 | ||||
-rw-r--r-- | include/linux/timex.h | 5 |
5 files changed, 29 insertions, 8 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 4bca8b60cdf7..5ea3c60c160c 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -273,7 +273,6 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) | |||
273 | } | 273 | } |
274 | 274 | ||
275 | 275 | ||
276 | /* used to install a new clocksource */ | ||
277 | extern int clocksource_register(struct clocksource*); | 276 | extern int clocksource_register(struct clocksource*); |
278 | extern void clocksource_unregister(struct clocksource*); | 277 | extern void clocksource_unregister(struct clocksource*); |
279 | extern void clocksource_touch_watchdog(void); | 278 | extern void clocksource_touch_watchdog(void); |
@@ -287,6 +286,24 @@ extern void clocksource_mark_unstable(struct clocksource *cs); | |||
287 | extern void | 286 | extern void |
288 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); | 287 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); |
289 | 288 | ||
289 | /* | ||
290 | * Don't call __clocksource_register_scale directly, use | ||
291 | * clocksource_register_hz/khz | ||
292 | */ | ||
293 | extern int | ||
294 | __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); | ||
295 | |||
296 | static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) | ||
297 | { | ||
298 | return __clocksource_register_scale(cs, 1, hz); | ||
299 | } | ||
300 | |||
301 | static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) | ||
302 | { | ||
303 | return __clocksource_register_scale(cs, 1000, khz); | ||
304 | } | ||
305 | |||
306 | |||
290 | static inline void | 307 | static inline void |
291 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) | 308 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) |
292 | { | 309 | { |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 5d86fb2309d2..fd0c1b857d3d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -422,6 +422,8 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, | |||
422 | 422 | ||
423 | extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta, | 423 | extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta, |
424 | const enum hrtimer_mode mode); | 424 | const enum hrtimer_mode mode); |
425 | extern int schedule_hrtimeout_range_clock(ktime_t *expires, | ||
426 | unsigned long delta, const enum hrtimer_mode mode, int clock); | ||
425 | extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode); | 427 | extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode); |
426 | 428 | ||
427 | /* Soft interrupt function to run the hrtimer queues: */ | 429 | /* Soft interrupt function to run the hrtimer queues: */ |
diff --git a/include/linux/time.h b/include/linux/time.h index 6e026e45a179..ea3559f0b3f2 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -150,7 +150,6 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | |||
150 | extern int timekeeping_valid_for_hres(void); | 150 | extern int timekeeping_valid_for_hres(void); |
151 | extern u64 timekeeping_max_deferment(void); | 151 | extern u64 timekeeping_max_deferment(void); |
152 | extern void update_wall_time(void); | 152 | extern void update_wall_time(void); |
153 | extern void update_xtime_cache(u64 nsec); | ||
154 | extern void timekeeping_leap_insert(int leapsecond); | 153 | extern void timekeeping_leap_insert(int leapsecond); |
155 | 154 | ||
156 | struct tms; | 155 | struct tms; |
diff --git a/include/linux/timer.h b/include/linux/timer.h index a2d1eb6cb3f0..ea965b857a50 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -10,13 +10,19 @@ | |||
10 | struct tvec_base; | 10 | struct tvec_base; |
11 | 11 | ||
12 | struct timer_list { | 12 | struct timer_list { |
13 | /* | ||
14 | * All fields that change during normal runtime grouped to the | ||
15 | * same cacheline | ||
16 | */ | ||
13 | struct list_head entry; | 17 | struct list_head entry; |
14 | unsigned long expires; | 18 | unsigned long expires; |
19 | struct tvec_base *base; | ||
15 | 20 | ||
16 | void (*function)(unsigned long); | 21 | void (*function)(unsigned long); |
17 | unsigned long data; | 22 | unsigned long data; |
18 | 23 | ||
19 | struct tvec_base *base; | 24 | int slack; |
25 | |||
20 | #ifdef CONFIG_TIMER_STATS | 26 | #ifdef CONFIG_TIMER_STATS |
21 | void *start_site; | 27 | void *start_site; |
22 | char start_comm[16]; | 28 | char start_comm[16]; |
@@ -165,6 +171,8 @@ extern int mod_timer(struct timer_list *timer, unsigned long expires); | |||
165 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); | 171 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); |
166 | extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); | 172 | extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); |
167 | 173 | ||
174 | extern void set_timer_slack(struct timer_list *time, int slack_hz); | ||
175 | |||
168 | #define TIMER_NOT_PINNED 0 | 176 | #define TIMER_NOT_PINNED 0 |
169 | #define TIMER_PINNED 1 | 177 | #define TIMER_PINNED 1 |
170 | /* | 178 | /* |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 7a082b32d8e1..32d852f8cbe4 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -232,13 +232,11 @@ struct timex { | |||
232 | */ | 232 | */ |
233 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ | 233 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ |
234 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ | 234 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ |
235 | extern int tickadj; /* amount of adjustment per tick */ | ||
236 | 235 | ||
237 | /* | 236 | /* |
238 | * phase-lock loop variables | 237 | * phase-lock loop variables |
239 | */ | 238 | */ |
240 | extern int time_status; /* clock synchronization status bits */ | 239 | extern int time_status; /* clock synchronization status bits */ |
241 | extern long time_adjust; /* The amount of adjtime left */ | ||
242 | 240 | ||
243 | extern void ntp_init(void); | 241 | extern void ntp_init(void); |
244 | extern void ntp_clear(void); | 242 | extern void ntp_clear(void); |
@@ -271,9 +269,6 @@ extern void second_overflow(void); | |||
271 | extern void update_ntp_one_tick(void); | 269 | extern void update_ntp_one_tick(void); |
272 | extern int do_adjtimex(struct timex *); | 270 | extern int do_adjtimex(struct timex *); |
273 | 271 | ||
274 | /* Don't use! Compatibility define for existing users. */ | ||
275 | #define tickadj (500/HZ ? : 1) | ||
276 | |||
277 | int read_current_timer(unsigned long *timer_val); | 272 | int read_current_timer(unsigned long *timer_val); |
278 | 273 | ||
279 | /* The clock frequency of the i8253/i8254 PIT */ | 274 | /* The clock frequency of the i8253/i8254 PIT */ |