Re: [PATCH] Fixes for IPMI use of timers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Corey Minyard wrote:


------------------------------------------------------------------------

Fix some problems with the high-res timer support.

Signed-off-by: Corey Minyard <[email protected]>

Index: linux-2.6.12-rc4/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.12-rc4.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ linux-2.6.12-rc4/drivers/char/ipmi/ipmi_si_intf.c
@@ -769,10 +769,11 @@
/* We already have irqsave on, so no need for it
                    here. */
-		read_lock(&xtime_lock);
+		read_lock_irqsave(&xtime_lock, flags);

I rather hope this fails to compile :) xtime_lock is a sequence lock in the 2.6 kernel.

 		jiffies_now = jiffies;
 		smi_info->si_timer.expires = jiffies_now;
 		smi_info->si_timer.sub_expires = get_arch_cycles(jiffies_now);
+		read_unlock_irqrestore(&xtime_lock, flags);
add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC); @@ -830,11 +831,11 @@
 		smi_info->short_timeouts++;
 		spin_unlock_irqrestore(&smi_info->count_lock, flags);
 #if defined(CONFIG_HIGH_RES_TIMERS)
-		read_lock(&xtime_lock);
+		read_lock_irqsave(&xtime_lock, flags);
                 smi_info->si_timer.expires = jiffies;
                 smi_info->si_timer.sub_expires
                         = get_arch_cycles(smi_info->si_timer.expires);
-                read_unlock(&xtime_lock);
+		read_unlock_irqrestore(&xtime_lock, flags);
 		add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC);
 #else
 		smi_info->si_timer.expires = jiffies + 1;

--
George Anzinger   [email protected]
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux