tree 7e2abe2dc483e05387c331ec41e1f5c51678dd3e
parent fd16230a05751af5a221a1f1c988bb519fd66679
author Giovambattista Pulcini <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:24:24
-0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:24:24 -0700
[PATCH] ppc32: Fix a problem with NTP on !(chrp||gemini)
The following problem was found by Giovambattista Pulcini
<[EMAIL PROTECTED]>, who also provided a partial patch, and this has been
verified by our time guru Gabriel Paubert <[EMAIL PROTECTED]>.
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 <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
ppc/kernel/time.c | 1 -
ppc/platforms/chrp_time.c | 2 --
ppc/platforms/gemini_setup.c | 3 ---
3 files changed, 6 deletions(-)
Index: arch/ppc/kernel/time.c
===================================================================
--- dbe3fd46c4bbe02a96d97e2599733287f455cfd3/arch/ppc/kernel/time.c
(mode:100644 sha1:50724139402ca25c46089cbf914e770a3d9168e2)
+++ 7e2abe2dc483e05387c331ec41e1f5c51678dd3e/arch/ppc/kernel/time.c
(mode:100644 sha1:b3cee6b014546192fd2f7f476d1fb3619493913b)
@@ -272,7 +272,6 @@
time_adjust = 0; /* stop active adjtime() */
time_status |= STA_UNSYNC;
- time_state = TIME_ERROR; /* p. 24, (a) */
time_maxerror = NTP_PHASE_LIMIT;
time_esterror = NTP_PHASE_LIMIT;
write_sequnlock_irqrestore(&xtime_lock, flags);
Index: arch/ppc/platforms/chrp_time.c
===================================================================
--- dbe3fd46c4bbe02a96d97e2599733287f455cfd3/arch/ppc/platforms/chrp_time.c
(mode:100644 sha1:e2be0c838d8a7c10063a6bc90bb3a2e476b4be60)
+++ 7e2abe2dc483e05387c331ec41e1f5c51678dd3e/arch/ppc/platforms/chrp_time.c
(mode:100644 sha1:4864a7de3daa9ac1373f9a2cf1fe4c288dcbac4d)
@@ -115,8 +115,6 @@
chrp_cmos_clock_write(save_control, RTC_CONTROL);
chrp_cmos_clock_write(save_freq_select, RTC_FREQ_SELECT);
- if ( (time_state == TIME_ERROR) || (time_state == TIME_BAD) )
- time_state = TIME_OK;
spin_unlock(&rtc_lock);
return 0;
}
Index: arch/ppc/platforms/gemini_setup.c
===================================================================
--- dbe3fd46c4bbe02a96d97e2599733287f455cfd3/arch/ppc/platforms/gemini_setup.c
(mode:100644 sha1:1a42cb9b1134c3c03322267557b0a38a649a2e30)
+++ 7e2abe2dc483e05387c331ec41e1f5c51678dd3e/arch/ppc/platforms/gemini_setup.c
(mode:100644 sha1:e391e52383c7e1455b7e3da5047522eedcca937b)
@@ -433,9 +433,6 @@
/* done writing */
gemini_rtc_write(reg, M48T35_RTC_CONTROL);
- if ((time_state == TIME_ERROR) || (time_state == TIME_BAD))
- time_state = TIME_OK;
-
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html