aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/chrp_time.c
diff options
context:
space:
mode:
authorGiovambattista Pulcini <gpulcini@swintel.it>2005-04-16 18:24:24 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:24:24 -0400
commit54095a6ec7b11a008c07c5016b025206a051f560 (patch)
tree7e2abe2dc483e05387c331ec41e1f5c51678dd3e /arch/ppc/platforms/chrp_time.c
parentfd16230a05751af5a221a1f1c988bb519fd66679 (diff)
[PATCH] ppc32: Fix a problem with NTP on !(chrp||gemini)
The following problem was found by Giovambattista Pulcini <gpulcini@swintel.it>, who also provided a partial patch, and this has been verified by our time guru Gabriel Paubert <paubert@iram.es>. The problem is that in do_settimeofday() we always set time_state to TIME_ERROR and except on two platforms, never re-set it. This meant that ntp_gettime() and ntp_adjtime() always returned TIME_ERROR, incorrectly. Based on Gabriel's analysis, time_state is used for leap-second processing, and ppc shouldn't be mucking with it. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/platforms/chrp_time.c')
-rw-r--r--arch/ppc/platforms/chrp_time.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c
index e2be0c838d8a..4864a7de3daa 100644
--- a/arch/ppc/platforms/chrp_time.c
+++ b/arch/ppc/platforms/chrp_time.c
@@ -115,8 +115,6 @@ int __chrp chrp_set_rtc_time(unsigned long nowtime)
115 chrp_cmos_clock_write(save_control, RTC_CONTROL); 115 chrp_cmos_clock_write(save_control, RTC_CONTROL);
116 chrp_cmos_clock_write(save_freq_select, RTC_FREQ_SELECT); 116 chrp_cmos_clock_write(save_freq_select, RTC_FREQ_SELECT);
117 117
118 if ( (time_state == TIME_ERROR) || (time_state == TIME_BAD) )
119 time_state = TIME_OK;
120 spin_unlock(&rtc_lock); 118 spin_unlock(&rtc_lock);
121 return 0; 119 return 0;
122} 120}