Re: 2.5.40-mm2

From: Andrew Morton (akpm@digeo.com)
Date: Sun Oct 06 2002 - 17:11:56 EST


grr. So that's what that "send" button does.

Updated patch:

--- 2.5.40/kernel/timer.c~timer-tricks Sun Oct 6 15:08:02 2002
+++ 2.5.40-akpm/kernel/timer.c Sun Oct 6 15:08:45 2002
@@ -265,23 +265,19 @@ repeat:
  */
 int del_timer_sync(timer_t *timer)
 {
- tvec_base_t *base = tvec_bases;
         int i, ret;
 
         ret = del_timer(timer);
 
         for (i = 0; i < NR_CPUS; i++) {
- if (!cpu_online(i))
- continue;
- if (base->running_timer == timer) {
- while (base->running_timer == timer) {
- cpu_relax();
- preempt_disable();
- preempt_enable();
+ if (cpu_online(i)) {
+ tvec_base_t *base = tvec_bases + i;
+ if (base->running_timer == timer) {
+ while (base->running_timer == timer)
+ cpu_relax();
+ break;
                         }
- break;
                 }
- base++;
         }
         return ret;
 }
@@ -359,9 +355,9 @@ repeat:
 #if CONFIG_SMP
                         base->running_timer = timer;
 #endif
- spin_unlock_irq(&base->lock);
+ spin_unlock_irqrestore(&base->lock, flags);
                         fn(data);
- spin_lock_irq(&base->lock);
+ spin_lock_irqsave(&base->lock, flags);
                         goto repeat;
                 }
                 ++base->timer_jiffies;

.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:56 EST