From: Oleg Nesterov 1. Fix compilation with CONFIG_NO_IDLE_HZ: s/->lock/->t_base.lock/ 2. s/_base/base as Ingo suggested. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton --- 25-alpha-akpm/include/linux/timer.h | 4 ++-- 25-alpha-akpm/kernel/timer.c | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff -puN include/linux/timer.h~timers-fixes-improvements-fix include/linux/timer.h --- 25-alpha/include/linux/timer.h~timers-fixes-improvements-fix 2005-04-02 02:08:55.000000000 -0800 +++ 25-alpha-akpm/include/linux/timer.h 2005-04-02 02:08:55.000000000 -0800 @@ -17,7 +17,7 @@ struct timer_list { void (*function)(unsigned long); unsigned long data; - struct timer_base_s *_base; + struct timer_base_s *base; }; #define TIMER_MAGIC 0x4b87ad6e @@ -28,7 +28,7 @@ extern struct timer_base_s __init_timer_ .function = (_function), \ .expires = (_expires), \ .data = (_data), \ - ._base = &__init_timer_base, \ + .base = &__init_timer_base, \ .magic = TIMER_MAGIC, \ } diff -puN kernel/timer.c~timers-fixes-improvements-fix kernel/timer.c --- 25-alpha/kernel/timer.c~timers-fixes-improvements-fix 2005-04-02 02:08:55.000000000 -0800 +++ 25-alpha-akpm/kernel/timer.c 2005-04-02 02:09:08.000000000 -0800 @@ -172,7 +172,7 @@ EXPORT_SYMBOL(__init_timer_base); void fastcall init_timer(struct timer_list *timer) { timer->entry.next = NULL; - timer->_base = &per_cpu(tvec_bases, _smp_processor_id()).t_base; + timer->base = &per_cpu(tvec_bases, _smp_processor_id()).t_base; timer->magic = TIMER_MAGIC; } EXPORT_SYMBOL(init_timer); @@ -194,11 +194,11 @@ static timer_base_t *lock_timer_base(str timer_base_t *base; for (;;) { - base = timer->_base; + base = timer->base; /* Can be NULL while __mod_timer switches bases */ if (likely(base != NULL)) { spin_lock_irqsave(&base->lock, *flags); - if (likely(base == timer->_base)) + if (likely(base == timer->base)) return base; spin_unlock_irqrestore(&base->lock, *flags); } @@ -232,13 +232,13 @@ int __mod_timer(struct timer_list *timer } if (base != &new_base->t_base) { - timer->_base = NULL; + timer->base = NULL; /* Safe: the timer can't be seen via ->entry, - * and lock_timer_base checks ->_base != 0. */ + * and lock_timer_base checks ->base != 0. */ spin_unlock(&base->lock); base = &new_base->t_base; spin_lock(&base->lock); - timer->_base = base; + timer->base = base; } timer->expires = expires; @@ -269,7 +269,7 @@ void add_timer_on(struct timer_list *tim check_timer(timer); spin_lock_irqsave(&base->t_base.lock, flags); - timer->_base = &base->t_base; + timer->base = &base->t_base; internal_add_timer(base, timer); spin_unlock_irqrestore(&base->t_base.lock, flags); } @@ -408,7 +408,7 @@ static int cascade(tvec_base_t *base, tv struct timer_list *tmp; tmp = list_entry(curr, struct timer_list, entry); - BUG_ON(tmp->_base != &base->t_base); + BUG_ON(tmp->base != &base->t_base); curr = curr->next; internal_add_timer(base, tmp); } @@ -490,7 +490,7 @@ unsigned long next_timer_interrupt(void) int i, j; base = &__get_cpu_var(tvec_bases); - spin_lock(&base->lock); + spin_lock(&base->t_base.lock); expires = base->timer_jiffies + (LONG_MAX >> 1); list = 0; @@ -538,7 +538,7 @@ found: expires = nte->expires; } } - spin_unlock(&base->lock); + spin_unlock(&base->t_base.lock); return expires; } #endif @@ -1301,7 +1301,7 @@ static void migrate_timer_list(tvec_base while (!list_empty(head)) { timer = list_entry(head->next, struct timer_list, entry); detach_timer(timer, 0); - timer->_base = &new_base->t_base; + timer->base = &new_base->t_base; internal_add_timer(new_base, timer); } } _