Re: [PATCH] clean up FIXME in do_timer_interrupt-lock fix
From: George Anzinger
Date: Sat Mar 19 2005 - 04:34:33 EST
Did you pick this up? First sent on 3-11.
Andrew Morton wrote:
Lee Revell <rlrevell@xxxxxxxxxxx> wrote:
On Thu, 2005-03-10 at 00:42 -0800, George Anzinger wrote:
This patch changes the update of the cmos clock to be timer driven
rather than poll driven by the timer interrupt function. If the clock
is not being synced to an outside source the timer is removed and thus
system overhead is nill in that case. The update frequency is still ~11
minutes and missing the update window still causes a retry in 60
No replies yet. Are there any objections to this patch?
Nope. I think it's neat. I queued it up.
I had a nightmare about ntp coming in at the "wrong" time resulting in a
deadlock. Attached locking changes will make me sleep better :)
George Anzinger george@xxxxxxxxxx
Source: MontaVista Software, Inc.
Type: Defect Fix
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).
Signed-off-by: George Anzinger <george@xxxxxxxxxx>
time.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
@@ -176,12 +176,12 @@ static int set_rtc_mmss(unsigned long no
/* gets recalled with irq locally disabled */
retval = efi_set_rtc_mmss(nowtime);
retval = mach_set_rtc_mmss(nowtime);
@@ -338,7 +338,7 @@ static void sync_cmos_clock(unsigned lon
+ mod_timer(&sync_cmos_timer, jiffies + 1);
static long clock_cmos_diff, sleep_start;