aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/timer.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index cc18857601e2..562d53eabb46 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -91,30 +91,6 @@ static inline void set_running_timer(tvec_base_t *base,
91#endif 91#endif
92} 92}
93 93
94static void check_timer_failed(struct timer_list *timer)
95{
96 static int whine_count;
97 if (whine_count < 16) {
98 whine_count++;
99 printk("Uninitialised timer!\n");
100 printk("This is just a warning. Your computer is OK\n");
101 printk("function=0x%p, data=0x%lx\n",
102 timer->function, timer->data);
103 dump_stack();
104 }
105 /*
106 * Now fix it up
107 */
108 timer->magic = TIMER_MAGIC;
109}
110
111static inline void check_timer(struct timer_list *timer)
112{
113 if (timer->magic != TIMER_MAGIC)
114 check_timer_failed(timer);
115}
116
117
118static void internal_add_timer(tvec_base_t *base, struct timer_list *timer) 94static void internal_add_timer(tvec_base_t *base, struct timer_list *timer)
119{ 95{
120 unsigned long expires = timer->expires; 96 unsigned long expires = timer->expires;
@@ -177,7 +153,6 @@ void fastcall init_timer(struct timer_list *timer)
177{ 153{
178 timer->entry.next = NULL; 154 timer->entry.next = NULL;
179 timer->base = &per_cpu(tvec_bases, raw_smp_processor_id()).t_base; 155 timer->base = &per_cpu(tvec_bases, raw_smp_processor_id()).t_base;
180 timer->magic = TIMER_MAGIC;
181} 156}
182EXPORT_SYMBOL(init_timer); 157EXPORT_SYMBOL(init_timer);
183 158
@@ -230,7 +205,6 @@ int __mod_timer(struct timer_list *timer, unsigned long expires)
230 int ret = 0; 205 int ret = 0;
231 206
232 BUG_ON(!timer->function); 207 BUG_ON(!timer->function);
233 check_timer(timer);
234 208
235 base = lock_timer_base(timer, &flags); 209 base = lock_timer_base(timer, &flags);
236 210
@@ -283,9 +257,6 @@ void add_timer_on(struct timer_list *timer, int cpu)
283 unsigned long flags; 257 unsigned long flags;
284 258
285 BUG_ON(timer_pending(timer) || !timer->function); 259 BUG_ON(timer_pending(timer) || !timer->function);
286
287 check_timer(timer);
288
289 spin_lock_irqsave(&base->t_base.lock, flags); 260 spin_lock_irqsave(&base->t_base.lock, flags);
290 timer->base = &base->t_base; 261 timer->base = &base->t_base;
291 internal_add_timer(base, timer); 262 internal_add_timer(base, timer);
@@ -316,8 +287,6 @@ int mod_timer(struct timer_list *timer, unsigned long expires)
316{ 287{
317 BUG_ON(!timer->function); 288 BUG_ON(!timer->function);
318 289
319 check_timer(timer);
320
321 /* 290 /*
322 * This is a common optimization triggered by the 291 * This is a common optimization triggered by the
323 * networking code - if the timer is re-modified 292 * networking code - if the timer is re-modified
@@ -348,8 +317,6 @@ int del_timer(struct timer_list *timer)
348 unsigned long flags; 317 unsigned long flags;
349 int ret = 0; 318 int ret = 0;
350 319
351 check_timer(timer);
352
353 if (timer_pending(timer)) { 320 if (timer_pending(timer)) {
354 base = lock_timer_base(timer, &flags); 321 base = lock_timer_base(timer, &flags);
355 if (timer_pending(timer)) { 322 if (timer_pending(timer)) {
@@ -412,8 +379,6 @@ out:
412 */ 379 */
413int del_timer_sync(struct timer_list *timer) 380int del_timer_sync(struct timer_list *timer)
414{ 381{
415 check_timer(timer);
416
417 for (;;) { 382 for (;;) {
418 int ret = try_to_del_timer_sync(timer); 383 int ret = try_to_del_timer_sync(timer);
419 if (ret >= 0) 384 if (ret >= 0)