All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fixes for IPMI use of timers
Date: Thu, 19 May 2005 21:20:22 -0500	[thread overview]
Message-ID: <428D4966.20506@acm.org> (raw)
In-Reply-To: <1116546667.23807.0.camel@mindpipe>

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

Lee Revell wrote:

>On Thu, 2005-05-19 at 18:30 -0500, Corey Minyard wrote:
>  
>
>>                /* We already have irqsave on, so no need for it
>>                    here. */
>>-               read_lock(&xtime_lock);
>>+               read_lock_irqsave(&xtime_lock, flags); 
>>    
>>
>
>The comment is now wrong.
>
>Lee
>  
>
I know I deleted that at least once.  Oh well, here it is with the 
comment removed.

Thanks.

-Corey



[-- Attachment #2: ipmi_hrt_fixes.diff --]
[-- Type: text/x-patch, Size: 1454 bytes --]

Fix some problems with the high-res timer support.

Signed-off-by: Corey Minyard <minyard@acm.org>

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
@@ -767,12 +767,11 @@
 		   immediately, anyway.  So we only process if we
 		   actually delete the timer. */
 
-		/* We already have irqsave on, so no need for it
-                   here. */
-		read_lock(&xtime_lock);
+		read_lock_irqsave(&xtime_lock, flags);
 		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 +829,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;

  reply	other threads:[~2005-05-20  2:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19 23:30 [PATCH] Fixes for IPMI use of timers Corey Minyard
2005-05-19 23:51 ` Lee Revell
2005-05-20  2:20   ` Corey Minyard [this message]
2005-05-21  1:14 ` George Anzinger
2005-05-21  1:30   ` Lee Revell
2005-05-21  2:00     ` Corey Minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=428D4966.20506@acm.org \
    --to=minyard@acm.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.