public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Work around console initialization ordering problem
@ 2003-03-09 16:32 Andi Kleen
  2003-03-09 21:45 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2003-03-09 16:32 UTC (permalink / raw)
  To: linux-kernel


Works around the console ordering problem in 2.5.64-bk3. Following 
the similar fix I did for x86-64.

-Andi

--- linux-2.5.64-work/arch/i386/kernel/setup.c-o	2003-03-05 10:40:08.000000000 +0100
+++ linux-2.5.64-work/arch/i386/kernel/setup.c	2003-03-09 17:27:57.000000000 +0100
@@ -516,6 +516,9 @@
 	int len = 0;
 	int userdef = 0;
 
+	if (!strstr(saved_command_line, "console="))
+	     strcat(saved_command_line, " console=tty0");
+
 	/* Save unparsed command line copy for /proc/cmdline */
 	memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
 	saved_command_line[COMMAND_LINE_SIZE-1] = '\0';

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

* Re: [PATCH] Work around console initialization ordering problem
  2003-03-09 16:32 [PATCH] Work around console initialization ordering problem Andi Kleen
@ 2003-03-09 21:45 ` Andrew Morton
  2003-03-09 23:34   ` Andi Kleen
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2003-03-09 21:45 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

Andi Kleen <ak@muc.de> wrote:
>
> 
> Works around the console ordering problem in 2.5.64-bk3. Following 
> the similar fix I did for x86-64.
> ...
> +	if (!strstr(saved_command_line, "console="))
> +	     strcat(saved_command_line, " console=tty0");
> +

We can do it by shuffling the link order:


diff -puN drivers/Makefile~console-ordering-fix drivers/Makefile
--- 25/drivers/Makefile~console-ordering-fix	2003-03-09 02:48:33.000000000 -0800
+++ 25-akpm/drivers/Makefile	2003-03-09 02:48:33.000000000 -0800
@@ -11,9 +11,10 @@ obj-$(CONFIG_ACPI)		+= acpi/
 # PnP must come after ACPI since it will eventually need to check if acpi
 # was used and do nothing if so
 obj-$(CONFIG_PNP)		+= pnp/
+obj-y				+= char/
 obj-y				+= serial/
 obj-$(CONFIG_PARPORT)		+= parport/
-obj-y				+= base/ char/ block/ misc/ net/ media/
+obj-y				+= base/ block/ misc/ net/ media/
 obj-$(CONFIG_NUBUS)		+= nubus/
 obj-$(CONFIG_ATM)		+= atm/
 obj-$(CONFIG_IDE)		+= ide/

_


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

* Re: [PATCH] Work around console initialization ordering problem
  2003-03-09 21:45 ` Andrew Morton
@ 2003-03-09 23:34   ` Andi Kleen
  2003-03-09 23:57     ` Andries Brouwer
  2003-03-10  0:42     ` Johannes Erdfelt
  0 siblings, 2 replies; 6+ messages in thread
From: Andi Kleen @ 2003-03-09 23:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andi Kleen, linux-kernel

On Sun, Mar 09, 2003 at 10:45:06PM +0100, Andrew Morton wrote:
> Andi Kleen <ak@muc.de> wrote:
> >
> > 
> > Works around the console ordering problem in 2.5.64-bk3. Following 
> > the similar fix I did for x86-64.
> > ...
> > +	if (!strstr(saved_command_line, "console="))
> > +	     strcat(saved_command_line, " console=tty0");
> > +
> 
> We can do it by shuffling the link order:

Yes, but someone will surely break it again. I feel my low tech solution is 
less fragile.

-Andi


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

* Re: [PATCH] Work around console initialization ordering problem
  2003-03-09 23:34   ` Andi Kleen
@ 2003-03-09 23:57     ` Andries Brouwer
  2003-03-10  0:25       ` Andi Kleen
  2003-03-10  0:42     ` Johannes Erdfelt
  1 sibling, 1 reply; 6+ messages in thread
From: Andries Brouwer @ 2003-03-09 23:57 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Andrew Morton, linux-kernel

On Mon, Mar 10, 2003 at 12:34:47AM +0100, Andi Kleen wrote:
> On Sun, Mar 09, 2003 at 10:45:06PM +0100, Andrew Morton wrote:
> > Andi Kleen <ak@muc.de> wrote:
> > >
> > > 
> > > Works around the console ordering problem in 2.5.64-bk3. Following 
> > > the similar fix I did for x86-64.
> > > ...
> > > +	if (!strstr(saved_command_line, "console="))
> > > +	     strcat(saved_command_line, " console=tty0");
> > > +
> > 
> > We can do it by shuffling the link order:
> 
> Yes, but someone will surely break it again. I feel my low tech solution is 
> less fragile.

But what about COMMAND_LINE_SIZE?


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

* Re: [PATCH] Work around console initialization ordering problem
  2003-03-09 23:57     ` Andries Brouwer
@ 2003-03-10  0:25       ` Andi Kleen
  0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2003-03-10  0:25 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: Andi Kleen, Andrew Morton, linux-kernel

On Mon, Mar 10, 2003 at 12:57:01AM +0100, Andries Brouwer wrote:
> But what about COMMAND_LINE_SIZE?

It's normally 2k. Is that likely to be reached?

-Andi

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

* Re: [PATCH] Work around console initialization ordering problem
  2003-03-09 23:34   ` Andi Kleen
  2003-03-09 23:57     ` Andries Brouwer
@ 2003-03-10  0:42     ` Johannes Erdfelt
  1 sibling, 0 replies; 6+ messages in thread
From: Johannes Erdfelt @ 2003-03-10  0:42 UTC (permalink / raw)
  To: linux-kernel

On Mon, Mar 10, 2003, Andi Kleen <ak@muc.de> wrote:
> On Sun, Mar 09, 2003 at 10:45:06PM +0100, Andrew Morton wrote:
> > Andi Kleen <ak@muc.de> wrote:
> > >
> > > 
> > > Works around the console ordering problem in 2.5.64-bk3. Following 
> > > the similar fix I did for x86-64.
> > > ...
> > > +	if (!strstr(saved_command_line, "console="))
> > > +	     strcat(saved_command_line, " console=tty0");
> > > +
> > 
> > We can do it by shuffling the link order:
> 
> Yes, but someone will surely break it again. I feel my low tech solution is 
> less fragile.

Wouldn't a well placed comment solve that?

JE


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

end of thread, other threads:[~2003-03-10  0:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-09 16:32 [PATCH] Work around console initialization ordering problem Andi Kleen
2003-03-09 21:45 ` Andrew Morton
2003-03-09 23:34   ` Andi Kleen
2003-03-09 23:57     ` Andries Brouwer
2003-03-10  0:25       ` Andi Kleen
2003-03-10  0:42     ` Johannes Erdfelt

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