public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
       [not found] ` <20061003010933.392428107@goop.org>
@ 2006-10-03  4:23   ` Paul Mackerras
  2006-10-03  4:33     ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Mackerras @ 2006-10-03  4:23 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Andrew Morton, linux-kernel, Andi Kleen, Hugh Dickens,
	Michael Ellerman, Benjamin Herrenschmidt, Rusty Russell

Jeremy Fitzhardinge writes:

> When my test machine hits a BUG, it simply returns from the exception handler
> after a second or so and reexecutes the bug.
> 
> This is independent of the use-generic-bug changes and might be related to
> XMON.
> 
> So it's some unknonw bug, and this change makes the powerpc kernel behave
> better when that bug hits.

NACK as to this part:

> +			if (btt == BUG_TRAP_TYPE_BUG)
> +				do_exit(SIGSEGV);

since it makes the kernel behave distinctly *worse* for me.

Paul.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
  2006-10-03  4:23   ` [PATCH 5/6] From: Andrew Morton <akpm@osdl.org> Paul Mackerras
@ 2006-10-03  4:33     ` Andrew Morton
  2006-10-03  5:19       ` Paul Mackerras
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-10-03  4:33 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Jeremy Fitzhardinge, linux-kernel, Andi Kleen, Hugh Dickens,
	Michael Ellerman, Benjamin Herrenschmidt, Rusty Russell

On Tue, 3 Oct 2006 14:23:06 +1000
Paul Mackerras <paulus@samba.org> wrote:

> Jeremy Fitzhardinge writes:
> 
> > When my test machine hits a BUG, it simply returns from the exception handler
> > after a second or so and reexecutes the bug.
> > 
> > This is independent of the use-generic-bug changes and might be related to
> > XMON.
> > 
> > So it's some unknonw bug, and this change makes the powerpc kernel behave
> > better when that bug hits.
> 
> NACK as to this part:
> 
> > +			if (btt == BUG_TRAP_TYPE_BUG)
> > +				do_exit(SIGSEGV);
> 
> since it makes the kernel behave distinctly *worse* for me.
> 

It makes it heaps better here.

Did you try my .config on the g5?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
  2006-10-03  4:33     ` Andrew Morton
@ 2006-10-03  5:19       ` Paul Mackerras
  2006-10-03  5:50         ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Mackerras @ 2006-10-03  5:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jeremy Fitzhardinge, linux-kernel, Andi Kleen, Hugh Dickens,
	Michael Ellerman, Benjamin Herrenschmidt, Rusty Russell

Andrew Morton writes:

> It makes it heaps better here.

The patch below should fix it properly.

> Did you try my .config on the g5?

Not yet; I can't find your .config in my inbox - maybe I deleted that
message by mistake.  Resend?

Paul.

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 8adad14..40e5e0d 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -503,7 +503,7 @@ #endif
 
 	mtmsr(msr);		/* restore interrupt enable */
 
-	return cmd != 'X';
+	return cmd != 'X' && cmd != EOF;
 }
 
 int xmon(struct pt_regs *excp)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
  2006-10-03  5:19       ` Paul Mackerras
@ 2006-10-03  5:50         ` Andrew Morton
  2006-10-03  6:55           ` Paul Mackerras
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-10-03  5:50 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Jeremy Fitzhardinge, linux-kernel, Andi Kleen, Hugh Dickens,
	Michael Ellerman, Benjamin Herrenschmidt, Rusty Russell

On Tue, 3 Oct 2006 15:19:50 +1000
Paul Mackerras <paulus@samba.org> wrote:

> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -503,7 +503,7 @@ #endif
>  
>  	mtmsr(msr);		/* restore interrupt enable */
>  
> -	return cmd != 'X';
> +	return cmd != 'X' && cmd != EOF;
>  }
>  
>  int xmon(struct pt_regs *excp)

That fixes it.

I still get crap all over the screen when xmon is tring to print something
(at least, I assume that's what causes it).  See
http://userweb.kernel.org/~akpm/s5000334.jpg


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
  2006-10-03  5:50         ` Andrew Morton
@ 2006-10-03  6:55           ` Paul Mackerras
  2006-10-03  7:20             ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Mackerras @ 2006-10-03  6:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jeremy Fitzhardinge, linux-kernel, Andi Kleen, Hugh Dickens,
	Michael Ellerman, Benjamin Herrenschmidt, Rusty Russell

Andrew Morton writes:

> I still get crap all over the screen when xmon is tring to print something
> (at least, I assume that's what causes it).  See
> http://userweb.kernel.org/~akpm/s5000334.jpg

That is because the nvidia console driver has changed the line pitch
from what the firmware set it to.  This should fix it by making the
nvidia driver inform the btext engine (which xmon uses if the screen
is its output device) about changes to display resolution.

Signed-off-by: Paul Mackerras <paulus@samba.org>
---
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index d4f8501..18b9101 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -28,6 +28,9 @@ #ifdef CONFIG_PPC_OF
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
 #endif
+#ifdef CONFIG_BOOTX_TEXT
+#include <asm/btext.h>
+#endif
 
 #include "nv_local.h"
 #include "nv_type.h"
@@ -681,6 +684,13 @@ #endif
 
 	nvidia_vga_protect(par, 0);
 
+#ifdef CONFIG_BOOTX_TEXT
+	/* Update debug text engine */
+	btext_update_display(info->fix.smem_start,
+			     info->var.xres, info->var.yres,
+			     info->var.bits_per_pixel, info->fix.line_length);
+#endif
+
 	NVTRACE_LEAVE();
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
  2006-10-03  6:55           ` Paul Mackerras
@ 2006-10-03  7:20             ` Andrew Morton
  2006-10-03  7:25               ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-10-03  7:20 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Jeremy Fitzhardinge, linux-kernel, Andi Kleen, Hugh Dickens,
	Michael Ellerman, Benjamin Herrenschmidt, Rusty Russell

On Tue, 3 Oct 2006 16:55:52 +1000
Paul Mackerras <paulus@samba.org> wrote:

> That is because the nvidia console driver has changed the line pitch
> from what the firmware set it to.  This should fix it by making the
> nvidia driver inform the btext engine (which xmon uses if the screen
> is its output device) about changes to display resolution.
> 
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
> index d4f8501..18b9101 100644
> --- a/drivers/video/nvidia/nvidia.c
> +++ b/drivers/video/nvidia/nvidia.c
> @@ -28,6 +28,9 @@ #ifdef CONFIG_PPC_OF
>  #include <asm/prom.h>
>  #include <asm/pci-bridge.h>
>  #endif
> +#ifdef CONFIG_BOOTX_TEXT
> +#include <asm/btext.h>
> +#endif
>  
>  #include "nv_local.h"
>  #include "nv_type.h"
> @@ -681,6 +684,13 @@ #endif
>  
>  	nvidia_vga_protect(par, 0);
>  
> +#ifdef CONFIG_BOOTX_TEXT
> +	/* Update debug text engine */
> +	btext_update_display(info->fix.smem_start,
> +			     info->var.xres, info->var.yres,
> +			     info->var.bits_per_pixel, info->fix.line_length);
> +#endif

yup, that fixed it.  xmon apparently doesn't know where fbcon's output
cursor is, but the characters are now readable.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/6] From: Andrew Morton <akpm@osdl.org>
  2006-10-03  7:20             ` Andrew Morton
@ 2006-10-03  7:25               ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2006-10-03  7:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Mackerras, Jeremy Fitzhardinge, linux-kernel, Andi Kleen,
	Hugh Dickens, Michael Ellerman, Rusty Russell


> yup, that fixed it.  xmon apparently doesn't know where fbcon's output
> cursor is, but the characters are now readable.

The low level text engine used by xmon (and my some early console/debug
stuff on powerpc as well) really doesn't have any link to fbcon... doing
that would be hard and ugly and take the risk of making it fragile,
which isn't what we want to do... usually, when you fall into xmon, you
don't care about your console cursor :) (In fact, that stuff can even
blast on top of X if the later has the UseFBDev option).

Ben.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/6] Generic implemenatation of BUG.
       [not found] ` <20061003010930.971200285@goop.org>
@ 2006-10-03 10:37   ` Andi Kleen
  2006-10-03 15:53     ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2006-10-03 10:37 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Andrew Morton, linux-kernel, Hugh Dickens, Michael Ellerman,
	Paul Mackerras, Benjamin Herrenschmidt, Rusty Russell

> Because powerpc also records the function name, I added this to i386 and
> x86-64 for consistency.  Strictly speaking the function name is redundant with
> kallsyms, so perhaps it can be dropped from powerpc.

It would be good to change it to use kallsyms() then.

>  
>  #ifdef CONFIG_BUG
> +
> +#ifdef CONFIG_GENERIC_BUG
> +struct bug_entry {
> +	unsigned long	bug_addr;
> +#ifdef CONFIG_DEBUG_BUGVERBOSE
> +	const char	*file;
> +	unsigned short	line;
> +#endif
> +	unsigned short	flags;

Can't you put the flags into the high bits of the line? I don't think
we have any 64kLOC files.

-Andi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/6] Generic implemenatation of BUG.
  2006-10-03 10:37   ` [PATCH 1/6] Generic implemenatation of BUG Andi Kleen
@ 2006-10-03 15:53     ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 9+ messages in thread
From: Jeremy Fitzhardinge @ 2006-10-03 15:53 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Andrew Morton, linux-kernel, Hugh Dickens, Michael Ellerman,
	Paul Mackerras, Benjamin Herrenschmidt, Rusty Russell

Andi Kleen wrote:
>> Because powerpc also records the function name, I added this to i386 and
>> x86-64 for consistency.  Strictly speaking the function name is redundant with
>> kallsyms, so perhaps it can be dropped from powerpc.
>>     
>
> It would be good to change it to use kallsyms() then.
>   

It does, in effect, when it prints the oops message and backtrace.

>>  
>>  #ifdef CONFIG_BUG
>> +
>> +#ifdef CONFIG_GENERIC_BUG
>> +struct bug_entry {
>> +	unsigned long	bug_addr;
>> +#ifdef CONFIG_DEBUG_BUGVERBOSE
>> +	const char	*file;
>> +	unsigned short	line;
>> +#endif
>> +	unsigned short	flags;
>>     
>
> Can't you put the flags into the high bits of the line? I don't think
> we have any 64kLOC files.

I thought about it, but it would still be padded out to 12 bytes on 
i386, and more on 64-bit platforms.  And it doesn't matter that much.


    J

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-10-03 15:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20061003010842.438670755@goop.org>
     [not found] ` <20061003010933.392428107@goop.org>
2006-10-03  4:23   ` [PATCH 5/6] From: Andrew Morton <akpm@osdl.org> Paul Mackerras
2006-10-03  4:33     ` Andrew Morton
2006-10-03  5:19       ` Paul Mackerras
2006-10-03  5:50         ` Andrew Morton
2006-10-03  6:55           ` Paul Mackerras
2006-10-03  7:20             ` Andrew Morton
2006-10-03  7:25               ` Benjamin Herrenschmidt
     [not found] ` <20061003010930.971200285@goop.org>
2006-10-03 10:37   ` [PATCH 1/6] Generic implemenatation of BUG Andi Kleen
2006-10-03 15:53     ` Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox