aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2004-08-22 22:32:30 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:32:30 -0700
commit8a163c94ce303a3933545de049b044d9034078c2 (patch)
tree9477cc27757be49a3335dc217185ca6dde6450fc /arch
parentcab7447082fbfa064ef466b061c40f79b1638f8e (diff)
downloadhistory-8a163c94ce303a3933545de049b044d9034078c2.tar.gz
[PATCH] ppc64: log firmware errors during boot
Firmware can report errors at any time, and not atypically during boot. However, these reports were being discarded until th rtasd comes up, which occurs fairly late in the boot cycle. As a result, firmware errors during boot were being silently ignored. Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/kernel/rtasd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c
index 7538cea27aed87..8d68c33509dd8b 100644
--- a/arch/ppc64/kernel/rtasd.c
+++ b/arch/ppc64/kernel/rtasd.c
@@ -57,6 +57,8 @@ volatile int error_log_cnt = 0;
*/
static unsigned char logdata[RTAS_ERROR_LOG_MAX];
+static int get_eventscan_parms(void);
+
/* To see this info, grep RTAS /var/log/messages and each entry
* will be collected together with obvious begin/end.
* There will be a unique identifier on the begin and end lines.
@@ -121,6 +123,9 @@ static int log_rtas_len(char * buf)
len += err->extended_log_length;
}
+ if (rtas_error_log_max == 0) {
+ get_eventscan_parms();
+ }
if (len > rtas_error_log_max)
len = rtas_error_log_max;
@@ -148,7 +153,6 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
int len = 0;
DEBUG("logging event\n");
-
if (buf == NULL)
return;
@@ -171,6 +175,13 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
if (!no_more_logging && !(err_type & ERR_FLAG_BOOT))
nvram_write_error_log(buf, len, err_type);
+ /* rtas errors can occur during boot, and we do want to capture
+ * those somewhere, even if nvram isn't ready (why not?), and even
+ * if rtasd isn't ready. Put them into the boot log, at least. */
+ if ((err_type & ERR_TYPE_MASK) == ERR_TYPE_RTAS_LOG) {
+ printk_log_rtas(buf, len);
+ }
+
/* Check to see if we need to or have stopped logging */
if (fatal || no_more_logging) {
no_more_logging = 1;