mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: george@mvista.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clean up FIXME in do_timer_interrupt-lock fix
Date: Sat, 19 Mar 2005 13:21:34 -0800	[thread overview]
Message-ID: <20050319132134.5953f176.akpm@osdl.org> (raw)
In-Reply-To: <423BF1E6.9030902@mvista.com>

George Anzinger <george@mvista.com> wrote:
>
> Did you pick this up?  First sent on 3-11.

I did, although now looking at it I have issues.

>  I was not happy with the locking on this.  Two changes:
>  1) Turn off irq while setting the clock.
>  2) Call the timer code only through the timer interface 
>     (set a short timer to do it from the ntp call).

I would consider this to be an inadequate description :(

>  Signed-off-by: George Anzinger <george@mvista.com>
> 
>   time.c |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
> 
>  Index: linux-2.6.12-rc/arch/i386/kernel/time.c
>  ===================================================================
>  --- linux-2.6.12-rc.orig/arch/i386/kernel/time.c
>  +++ linux-2.6.12-rc/arch/i386/kernel/time.c
>  @@ -176,12 +176,12 @@ static int set_rtc_mmss(unsigned long no
>   	int retval;
>   
>   	/* gets recalled with irq locally disabled */
>  -	spin_lock(&rtc_lock);
>  +	spin_lock_irq(&rtc_lock);
>   	if (efi_enabled)
>   		retval = efi_set_rtc_mmss(nowtime);
>   	else
>   		retval = mach_set_rtc_mmss(nowtime);
>  -	spin_unlock(&rtc_lock);
>  +	spin_unlock_irq(&rtc_lock);
>   
>   	return retval;
>   }

If the comment is correct, and this code is called with local irq's
disabled then this patch should be using spin_lock_irqsave()

>  @@ -338,7 +338,7 @@ static void sync_cmos_clock(unsigned lon
>   }
>   void notify_arch_cmos_timer(void)
>   {
>  -	sync_cmos_clock(0);
>  +	mod_timer(&sync_cmos_timer, jiffies + 1);
>   }
>   static long clock_cmos_diff, sleep_start;
>   

Your description says what this does, but it doesn't way why it was done?

  reply	other threads:[~2005-03-19 21:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 17:10 [PATCH] clean up FIXME in do_timer_interrupt Lee Revell
2005-03-04  0:45 ` Andrew Morton
2005-03-04  1:19   ` Lee Revell
2005-03-04 10:28     ` George Anzinger
2005-03-04 20:43       ` Lee Revell
2005-03-04 20:58         ` George Anzinger
2005-03-08 20:27           ` Lee Revell
2005-03-08 23:23             ` George Anzinger
2005-03-10  8:42               ` George Anzinger
2005-03-11 22:23                 ` Lee Revell
2005-03-11 22:34                   ` Andrew Morton
2005-03-12  2:01                     ` George Anzinger
2005-03-19  9:33                     ` [PATCH] clean up FIXME in do_timer_interrupt-lock fix George Anzinger
2005-03-19 21:21                       ` Andrew Morton [this message]
2005-03-19 22:23                         ` George Anzinger

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=20050319132134.5953f176.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®