aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-01-12 19:59:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:07 -0500
commit3e5c12409c54c30f1d1b16bba5d4d24e35aa283c (patch)
tree1582983eda70a025eabe6c459a5ee8d1d94a5e16
parent04c6862c055fb687c90d9652f32c11a063df15cf (diff)
set_rtc_mmss: show warning message only once
Occasionally the system gets into a state where the CMOS clock has gotten slightly ahead of current time and the periodic update of RTC fails. The message is a nuisance and repeats spamming the log. See: http://www.ntp.org/ntpfaq/NTP-s-trbl-spec.htm#Q-LINUX-SET-RTC-MMSS Rather than just removing the message, make it show only once and reduce severity since it indicates a normal and non urgent condition. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/alpha/kernel/time.c2
-rw-r--r--arch/cris/kernel/time.c2
-rw-r--r--arch/mips/dec/time.c2
-rw-r--r--arch/mips/include/asm/mc146818-time.h2
-rw-r--r--arch/mn10300/kernel/rtc.c2
-rw-r--r--arch/sh/boards/mach-sh03/rtc.c2
-rw-r--r--arch/x86/kernel/rtc.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 0f1d8493cfc..c1f3e7cb82a 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -506,7 +506,7 @@ set_rtc_mmss(unsigned long nowtime)
506 CMOS_WRITE(real_seconds,RTC_SECONDS); 506 CMOS_WRITE(real_seconds,RTC_SECONDS);
507 CMOS_WRITE(real_minutes,RTC_MINUTES); 507 CMOS_WRITE(real_minutes,RTC_MINUTES);
508 } else { 508 } else {
509 printk(KERN_WARNING 509 printk_once(KERN_NOTICE
510 "set_rtc_mmss: can't update from %d to %d\n", 510 "set_rtc_mmss: can't update from %d to %d\n",
511 cmos_minutes, real_minutes); 511 cmos_minutes, real_minutes);
512 retval = -1; 512 retval = -1;
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c
index b5096430ce1..4e73092e85c 100644
--- a/arch/cris/kernel/time.c
+++ b/arch/cris/kernel/time.c
@@ -86,7 +86,7 @@ int set_rtc_mmss(unsigned long nowtime)
86 CMOS_WRITE(real_seconds,RTC_SECONDS); 86 CMOS_WRITE(real_seconds,RTC_SECONDS);
87 CMOS_WRITE(real_minutes,RTC_MINUTES); 87 CMOS_WRITE(real_minutes,RTC_MINUTES);
88 } else { 88 } else {
89 printk(KERN_WARNING 89 printk_once(KERN_NOTICE
90 "set_rtc_mmss: can't update from %d to %d\n", 90 "set_rtc_mmss: can't update from %d to %d\n",
91 cmos_minutes, real_minutes); 91 cmos_minutes, real_minutes);
92 retval = -1; 92 retval = -1;
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c
index 02f505f23c3..ea57f39e673 100644
--- a/arch/mips/dec/time.c
+++ b/arch/mips/dec/time.c
@@ -104,7 +104,7 @@ int rtc_mips_set_mmss(unsigned long nowtime)
104 CMOS_WRITE(real_seconds, RTC_SECONDS); 104 CMOS_WRITE(real_seconds, RTC_SECONDS);
105 CMOS_WRITE(real_minutes, RTC_MINUTES); 105 CMOS_WRITE(real_minutes, RTC_MINUTES);
106 } else { 106 } else {
107 printk(KERN_WARNING 107 printk_once(KERN_NOTICE
108 "set_rtc_mmss: can't update from %d to %d\n", 108 "set_rtc_mmss: can't update from %d to %d\n",
109 cmos_minutes, real_minutes); 109 cmos_minutes, real_minutes);
110 retval = -1; 110 retval = -1;
diff --git a/arch/mips/include/asm/mc146818-time.h b/arch/mips/include/asm/mc146818-time.h
index 199b45733a9..4a08dbe37db 100644
--- a/arch/mips/include/asm/mc146818-time.h
+++ b/arch/mips/include/asm/mc146818-time.h
@@ -66,7 +66,7 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime)
66 CMOS_WRITE(real_seconds, RTC_SECONDS); 66 CMOS_WRITE(real_seconds, RTC_SECONDS);
67 CMOS_WRITE(real_minutes, RTC_MINUTES); 67 CMOS_WRITE(real_minutes, RTC_MINUTES);
68 } else { 68 } else {
69 printk(KERN_WARNING 69 printk_once(KERN_NOTICE
70 "set_rtc_mmss: can't update from %d to %d\n", 70 "set_rtc_mmss: can't update from %d to %d\n",
71 cmos_minutes, real_minutes); 71 cmos_minutes, real_minutes);
72 retval = -1; 72 retval = -1;
diff --git a/arch/mn10300/kernel/rtc.c b/arch/mn10300/kernel/rtc.c
index e9e20f9a4dd..48d7058b329 100644
--- a/arch/mn10300/kernel/rtc.c
+++ b/arch/mn10300/kernel/rtc.c
@@ -89,7 +89,7 @@ static int set_rtc_mmss(unsigned long nowtime)
89 CMOS_WRITE(real_seconds, RTC_SECONDS); 89 CMOS_WRITE(real_seconds, RTC_SECONDS);
90 CMOS_WRITE(real_minutes, RTC_MINUTES); 90 CMOS_WRITE(real_minutes, RTC_MINUTES);
91 } else { 91 } else {
92 printk(KERN_WARNING 92 printk_once(KERN_NOTICE
93 "set_rtc_mmss: can't update from %d to %d\n", 93 "set_rtc_mmss: can't update from %d to %d\n",
94 cmos_minutes, real_minutes); 94 cmos_minutes, real_minutes);
95 retval = -1; 95 retval = -1;
diff --git a/arch/sh/boards/mach-sh03/rtc.c b/arch/sh/boards/mach-sh03/rtc.c
index 1b200990500..f83ac7995d0 100644
--- a/arch/sh/boards/mach-sh03/rtc.c
+++ b/arch/sh/boards/mach-sh03/rtc.c
@@ -108,7 +108,7 @@ static int set_rtc_mmss(unsigned long nowtime)
108 __raw_writeb(real_minutes % 10, RTC_MIN1); 108 __raw_writeb(real_minutes % 10, RTC_MIN1);
109 __raw_writeb(real_minutes / 10, RTC_MIN10); 109 __raw_writeb(real_minutes / 10, RTC_MIN10);
110 } else { 110 } else {
111 printk(KERN_WARNING 111 printk_once(KERN_NOTICE
112 "set_rtc_mmss: can't update from %d to %d\n", 112 "set_rtc_mmss: can't update from %d to %d\n",
113 cmos_minutes, real_minutes); 113 cmos_minutes, real_minutes);
114 retval = -1; 114 retval = -1;
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index 1cfbbfc3ae2..6f39cab052d 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -76,7 +76,7 @@ int mach_set_rtc_mmss(unsigned long nowtime)
76 CMOS_WRITE(real_seconds, RTC_SECONDS); 76 CMOS_WRITE(real_seconds, RTC_SECONDS);
77 CMOS_WRITE(real_minutes, RTC_MINUTES); 77 CMOS_WRITE(real_minutes, RTC_MINUTES);
78 } else { 78 } else {
79 printk(KERN_WARNING 79 printk_once(KERN_NOTICE
80 "set_rtc_mmss: can't update from %d to %d\n", 80 "set_rtc_mmss: can't update from %d to %d\n",
81 cmos_minutes, real_minutes); 81 cmos_minutes, real_minutes);
82 retval = -1; 82 retval = -1;