login
Header Space

 
 

Re: 2.6.23-rc7-mm1 -- powerpc rtas panic

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Michael Ellerman <michael@...>
Cc: Linas Vepstas <linas@...>, <linuxppc-dev@...>, Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Tuesday, October 2, 2007 - 9:19 pm

On Wed, Oct 03, 2007 at 10:30:16AM +1000, Michael Ellerman wrote:
 

Sure, what about?

Clarify when RTAS logging is enabled.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

---
 arch/powerpc/platforms/pseries/rtasd.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 30925d2..73401c8 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -54,8 +54,9 @@ static unsigned int rtas_event_scan_rate;
 static int full_rtas_msgs = 0;
 
 /* Stop logging to nvram after first fatal error */
-static int no_more_logging;
-
+static int logging_enabled; /* Until we initialize everything,
+                             * make sure we don't try logging
+                             * anything */
 static int error_log_cnt;
 
 /*
@@ -217,7 +218,7 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
 	}
 
 	/* Write error to NVRAM */
-	if (!no_more_logging && !(err_type & ERR_FLAG_BOOT))
+	if (logging_enabled && !(err_type & ERR_FLAG_BOOT))
 		nvram_write_error_log(buf, len, err_type, error_log_cnt);
 
 	/*
@@ -229,8 +230,8 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
 		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;
+	if (fatal || !logging_enabled) {
+		logging_enabled = 0;
 		spin_unlock_irqrestore(&rtasd_log_lock, s);
 		return;
 	}
@@ -302,7 +303,7 @@ static ssize_t rtas_log_read(struct file * file, char __user * buf,
 
 	spin_lock_irqsave(&rtasd_log_lock, s);
 	/* if it's 0, then we know we got the last one (the one in NVRAM) */
-	if (rtas_log_size == 0 && !no_more_logging)
+	if (rtas_log_size == 0 && logging_enabled)
 		nvram_clear_error_log();
 	spin_unlock_irqrestore(&rtasd_log_lock, s);
 
@@ -414,6 +415,8 @@ static int rtasd(void *unused)
 	memset(logdata, 0, rtas_error_log_max);
 	rc = nvram_read_error_log(logdata, rtas_error_log_max,
 	                          &err_type, &error_log_cnt);
+	/* We can use rtas_log_buf now */
+	logging_enabled = 1;
 
 	if (!rc) {
 		if (err_type != ERR_FLAG_ALREADY_LOGGED) {

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.23-rc7-mm1, Andrew Morton, (Mon Sep 24, 5:17 am)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 6:20 pm)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 3:41 pm)
Re: 2.6.23-rc7-mm1, Mel Gorman, (Tue Sep 25, 6:23 am)
Re: 2.6.23-rc7-mm1, Jens Axboe, (Tue Sep 25, 6:31 am)
Re: 2.6.23-rc7-mm1, Mel Gorman, (Tue Sep 25, 7:15 am)
Re: 2.6.23-rc7-mm1, Jens Axboe, (Tue Sep 25, 7:23 am)
Re: 2.6.23-rc7-mm1, Torsten Kaiser, (Mon Sep 24, 3:07 pm)
Re: 2.6.23-rc7-mm1, Andrew Morton, (Mon Sep 24, 3:34 pm)
Re: 2.6.23-rc7-mm1, Thomas Gleixner, (Mon Sep 24, 4:25 pm)
Re: 2.6.23-rc7-mm1, Torsten Kaiser, (Tue Sep 25, 3:32 am)
Re: 2.6.23-rc7-mm1, Thomas Gleixner, (Tue Sep 25, 3:44 am)
Re: 2.6.23-rc7-mm1 ia64 build issue in efi.c, Bob Picco, (Mon Sep 24, 11:18 am)
Re: 2.6.23-rc7-mm1, Reuben Farrelly, (Mon Sep 24, 10:52 am)
Re: 2.6.23-rc7-mm1, Andrew Morton, (Mon Sep 24, 12:59 pm)
Re: 2.6.23-rc7-mm1, J. Bruce Fields, (Mon Sep 24, 1:12 pm)
Re: 2.6.23-rc7-mm1, Reuben Farrelly, (Mon Sep 24, 5:31 pm)
[PATCH rc7-mm1] fix BUG at mm/swap.c:405!, Hugh Dickins, (Mon Sep 24, 9:17 am)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 9:13 am)
Re: 2.6.23-rc7-mm1, Andrew Morton, (Mon Sep 24, 12:44 pm)
Re: 2.6.23-rc7-mm1, Peter Zijlstra, (Mon Sep 24, 12:57 pm)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 1:08 pm)
Re: 2.6.23-rc7-mm1, Peter Zijlstra, (Mon Sep 24, 3:20 pm)
Re: 2.6.23-rc7-mm1, Peter Zijlstra, (Tue Sep 25, 7:05 am)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Tue Sep 25, 9:07 am)
Re: 2.6.23-rc7-mm1, Cedric Le Goater, (Mon Sep 24, 9:00 am)
Re: 2.6.23-rc7-mm1, Cedric Le Goater, (Mon Sep 24, 9:10 am)
Re: 2.6.23-rc7-mm1, Jens Axboe, (Mon Sep 24, 12:57 pm)
Re: 2.6.23-rc7-mm1, Vlad Yasevich, (Mon Sep 24, 9:29 am)
Re: 2.6.23-rc7-mm1, Jens Axboe, (Mon Sep 24, 12:58 pm)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 8:55 am)
Re: 2.6.23-rc7-mm1, Pavel Emelyanov, (Mon Sep 24, 9:10 am)
Re: 2.6.23-rc7-mm1, Balbir Singh, (Mon Sep 24, 9:21 am)
Re: 2.6.23-rc7-mm1, Pavel Emelyanov, (Mon Sep 24, 11:34 am)
Re: 2.6.23-rc7-mm1, Balbir Singh, (Mon Sep 24, 12:10 pm)
Re: 2.6.23-rc7-mm1, Cedric Le Goater, (Mon Sep 24, 8:47 am)
Re: 2.6.23-rc7-mm1, Jens Axboe, (Mon Sep 24, 12:56 pm)
2.6.23-rc7-mm1 -- powerpc rtas panic, Andy Whitcroft, (Mon Sep 24, 8:35 am)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Linas Vepstas, (Tue Oct 2, 7:28 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Tony Breeds, (Tue Oct 2, 8:26 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Michael Ellerman, (Tue Oct 2, 8:30 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Tony Breeds, (Tue Oct 2, 9:19 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Nish Aravamudan, (Thu Oct 4, 8:01 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Linas Vepstas, (Fri Oct 5, 12:03 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Nish Aravamudan, (Sun Oct 7, 11:47 pm)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Michael Ellerman, (Wed Oct 3, 12:09 am)
Re: 2.6.23-rc7-mm1 -- powerpc rtas panic, Linas Vepstas, (Wed Oct 3, 2:50 pm)
Re: 2.6.23-rc7-mm1, Jiri Slaby, (Mon Sep 24, 8:33 am)
Re: [linux-usb-devel] 2.6.23-rc7-mm1, Alan Stern, (Mon Sep 24, 10:41 am)
Re: [linux-usb-devel] 2.6.23-rc7-mm1, Jiri Slaby, (Mon Sep 24, 2:45 pm)
Re: [linux-usb-devel] 2.6.23-rc7-mm1, Alan Stern, (Mon Sep 24, 3:06 pm)
Re: [linux-usb-devel] 2.6.23-rc7-mm1, Jiri Slaby, (Mon Sep 24, 3:18 pm)
Re: [linux-usb-devel] 2.6.23-rc7-mm1, Alan Stern, (Mon Sep 24, 3:41 pm)
Re: [linux-usb-devel] 2.6.23-rc7-mm1, Jiri Slaby, (Sun Sep 30, 4:26 am)
2.6.23-rc7-mm1 -- s390 compile failures, Andy Whitcroft, (Mon Sep 24, 8:32 am)
Re: 2.6.23-rc7-mm1 -- s390 compile failures, Cedric Le Goater, (Mon Sep 24, 8:49 am)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 7:42 am)
Re: 2.6.23-rc7-mm1 - 'touch' command causes Oops., Christoph Hellwig, (Mon Sep 24, 8:05 am)
Re: 2.6.23-rc7-mm1 - 'touch' command causes Oops., Dave Hansen, (Mon Sep 24, 11:45 am)
Re: 2.6.23-rc7-mm1 - 'touch' command causes Oops., Balbir Singh, (Mon Sep 24, 7:08 am)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 6:07 am)
Re: 2.6.23-rc7-mm1, Sam Ravnborg, (Mon Sep 24, 5:02 pm)
Re: 2.6.23-rc7-mm1, Sam Ravnborg, (Mon Sep 24, 5:36 pm)
Re: 2.6.23-rc7-mm1, Kamalesh Babulal, (Mon Sep 24, 7:27 pm)
speck-geostationary