From: George Anzinger We want the calls to sync_cmos_clock() to be made in a consistent environment. This was not true when calling it directly from the NTP call code. The change means that sync_cmos_clock() is ALWAYS called from run_timers(), i.e. as a timer call back function. Also, 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 Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/time.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN arch/i386/kernel/time.c~x86-cmos-time-update-optimisation-locking-fix arch/i386/kernel/time.c --- 25/arch/i386/kernel/time.c~x86-cmos-time-update-optimisation-locking-fix 2005-03-19 14:16:20.000000000 -0800 +++ 25-akpm/arch/i386/kernel/time.c 2005-03-19 14:37:36.000000000 -0800 @@ -205,12 +205,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; } @@ -369,7 +369,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; _