<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;

1. Fix compilation with CONFIG_NO_IDLE_HZ:
   s/-&gt;lock/-&gt;t_base.lock/

2. s/_base/base as Ingo suggested.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 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 = &amp;__init_timer_base,			\
+		.base = &amp;__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-&gt;entry.next = NULL;
-	timer-&gt;_base = &amp;per_cpu(tvec_bases, _smp_processor_id()).t_base;
+	timer-&gt;base = &amp;per_cpu(tvec_bases, _smp_processor_id()).t_base;
 	timer-&gt;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-&gt;_base;
+		base = timer-&gt;base;
 		/* Can be NULL while __mod_timer switches bases */
 		if (likely(base != NULL)) {
 			spin_lock_irqsave(&amp;base-&gt;lock, *flags);
-			if (likely(base == timer-&gt;_base))
+			if (likely(base == timer-&gt;base))
 				return base;
 			spin_unlock_irqrestore(&amp;base-&gt;lock, *flags);
 		}
@@ -232,13 +232,13 @@ int __mod_timer(struct timer_list *timer
 		}
 
 		if (base != &amp;new_base-&gt;t_base) {
-			timer-&gt;_base = NULL;
+			timer-&gt;base = NULL;
 			/* Safe: the timer can't be seen via -&gt;entry,
-			 * and lock_timer_base checks -&gt;_base != 0. */
+			 * and lock_timer_base checks -&gt;base != 0. */
 			spin_unlock(&amp;base-&gt;lock);
 			base = &amp;new_base-&gt;t_base;
 			spin_lock(&amp;base-&gt;lock);
-			timer-&gt;_base = base;
+			timer-&gt;base = base;
 		}
 
 		timer-&gt;expires = expires;
@@ -269,7 +269,7 @@ void add_timer_on(struct timer_list *tim
 	check_timer(timer);
 
 	spin_lock_irqsave(&amp;base-&gt;t_base.lock, flags);
-	timer-&gt;_base = &amp;base-&gt;t_base;
+	timer-&gt;base = &amp;base-&gt;t_base;
 	internal_add_timer(base, timer);
 	spin_unlock_irqrestore(&amp;base-&gt;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-&gt;_base != &amp;base-&gt;t_base);
+		BUG_ON(tmp-&gt;base != &amp;base-&gt;t_base);
 		curr = curr-&gt;next;
 		internal_add_timer(base, tmp);
 	}
@@ -490,7 +490,7 @@ unsigned long next_timer_interrupt(void)
 	int i, j;
 
 	base = &amp;__get_cpu_var(tvec_bases);
-	spin_lock(&amp;base-&gt;lock);
+	spin_lock(&amp;base-&gt;t_base.lock);
 	expires = base-&gt;timer_jiffies + (LONG_MAX &gt;&gt; 1);
 	list = 0;
 
@@ -538,7 +538,7 @@ found:
 				expires = nte-&gt;expires;
 		}
 	}
-	spin_unlock(&amp;base-&gt;lock);
+	spin_unlock(&amp;base-&gt;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-&gt;next, struct timer_list, entry);
 		detach_timer(timer, 0);
-		timer-&gt;_base = &amp;new_base-&gt;t_base;
+		timer-&gt;base = &amp;new_base-&gt;t_base;
 		internal_add_timer(new_base, timer);
 	}
 }
_
</pre></body></html>