Message ID | 20101107132051.GE19881@here |
---|---|
State | RFC |
Delegated to: | David Miller |
Headers | show |
From: Adrien Mazarguil <maz@p0d.org> Date: Sun, 7 Nov 2010 14:20:51 +0100 > While trying recent kernels on a Sun Netra AX1105 board, I noticed that the > boot process stopped before init had a chance to run. Using git bisect, I > narrowed this regression down to that commit: ... > On this board, the new prom_nbputchar() fails at some point in the boot > process and no subsequent output is shown. Using either the older function > in place of this one or a static buffer solve that issue. This seems related > to this paragraph in the above commit log: ... > Looks like it is still required by older boards, or maybe something else > needs to be fixed? This is strange because everything works fine until the > first call to schedule() just before the last assembly part of switch_to() > macro. Thanks for tracking down this problem. The real issue is that on older boards, passing larger than 32-bit addresses to prom calls (generally) doesn't work correctly. That's why using a static variable instead of a kernel stack variable fixes the problem. This is a larger can of worms than just these two console I/O routines, let me do the audit and I'll give you a patch to test. Thanks! -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: David Miller <davem@davemloft.net> Date: Tue, 16 Nov 2010 12:01:01 -0800 (PST) > This is a larger can of worms than just these two console I/O > routines, let me do the audit and I'll give you a patch to test. Sorry for taking so long. I have a set of patches which fix this problem, I'll post them with you CC:'d so you can test them out. Thanks! -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Dec 03, 2010 at 10:18:08AM -0800, David Miller wrote: > > This is a larger can of worms than just these two console I/O > > routines, let me do the audit and I'll give you a patch to test. > > Sorry for taking so long. > > I have a set of patches which fix this problem, I'll post > them with you CC:'d so you can test them out. Thanks! I applied them to the current kernel head, compiled for sparc64 and tested on my board (Netra AX1105). Works perfectly.
From: Adrien Mazarguil <maz@p0d.org> Date: Sat, 4 Dec 2010 10:34:54 +0100 > On Fri, Dec 03, 2010 at 10:18:08AM -0800, David Miller wrote: >> > This is a larger can of worms than just these two console I/O >> > routines, let me do the audit and I'll give you a patch to test. >> >> Sorry for taking so long. >> >> I have a set of patches which fix this problem, I'll post >> them with you CC:'d so you can test them out. > > Thanks! I applied them to the current kernel head, compiled for sparc64 and > tested on my board (Netra AX1105). Works perfectly. Thanks for your report, patience, and testing. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/prom/console_64.c b/arch/sparc/prom/console_64.c index 10322dc..fe2a7c0 100644 --- a/arch/sparc/prom/console_64.c +++ b/arch/sparc/prom/console_64.c @@ -22,7 +22,7 @@ inline int prom_nbgetchar(void) { unsigned long args[7]; - char inc; + static char inc; args[0] = (unsigned long) "read"; args[1] = 3; @@ -46,8 +46,8 @@ inline int prom_nbputchar(char c) { unsigned long args[7]; - char outc; - + static char outc; + outc = c; args[0] = (unsigned long) "write"; @@ -62,8 +62,7 @@ prom_nbputchar(char c) if (args[6] == 1) return 0; - else - return -1; + return -1; } /* Blocking version of get character routine above. */