* [PATCH] ppc64: iSeries early printk breakage
@ 2005-09-07 9:52 Stephen Rothwell
2005-09-07 11:04 ` Milton Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2005-09-07 9:52 UTC (permalink / raw)
To: Linus; +Cc: paulus, anton, LKML, ppc64-dev, Milton Miller
[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]
The earlier commit 8d9273918635f0301368c01b56c03a6f339e8d51
(Consolidate early console and PPCDBG code) broke iSeries because
it caused unregister_console(&udbg_console) to be called
unconditionally. iSeries never registers the udbg_console.
This just reverts part of the change.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/ppc64/kernel/udbg.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
234f5032f6ccb4d72e4b74d33af55716b67d8a27
diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c
--- a/arch/ppc64/kernel/udbg.c
+++ b/arch/ppc64/kernel/udbg.c
@@ -158,14 +158,20 @@ static struct console udbg_console = {
.index = -1,
};
+static int early_console_initialized;
+
void __init disable_early_printk(void)
{
+ if (!early_console_initialized)
+ return;
unregister_console(&udbg_console);
+ early_console_initialized = 0;
}
/* called by setup_system */
void register_early_udbg_console(void)
{
+ early_console_initialized = 1;
register_console(&udbg_console);
}
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ppc64: iSeries early printk breakage
2005-09-07 9:52 [PATCH] ppc64: iSeries early printk breakage Stephen Rothwell
@ 2005-09-07 11:04 ` Milton Miller
2005-09-08 1:01 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Milton Miller @ 2005-09-07 11:04 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Paul Mackerras, ppc64-dev, LKML, Greg Edwards, Anton Blanchard, Linus
Does anything actually break without this patch?
My reading of unregister_console says we will acquire
the console semaphore, walk the list, fail to find the
console, relase the semaphore, and return.
Hmm... unless there is a problem with the console preference
code? I don't see anything that should deref a bad pointer,
maybe it breaks the preference?
From get web:
if (console_drivers == NULL)
preferred_console = selected_console;
else if (console->flags & CON_CONSDEV)
console_drivers->flags |= CON_CONSDEV;
On Sep 7, 2005, at 4:52 AM, Stephen Rothwell wrote:
> The earlier commit 8d9273918635f0301368c01b56c03a6f339e8d51
> (Consolidate early console and PPCDBG code) broke iSeries because
> it caused unregister_console(&udbg_console) to be called
> unconditionally. iSeries never registers the udbg_console.
>
> This just reverts part of the change.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>
> arch/ppc64/kernel/udbg.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
>
> 234f5032f6ccb4d72e4b74d33af55716b67d8a27
> diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c
> --- a/arch/ppc64/kernel/udbg.c
> +++ b/arch/ppc64/kernel/udbg.c
> @@ -158,14 +158,20 @@ static struct console udbg_console = {
> .index = -1,
> };
>
> +static int early_console_initialized;
> +
> void __init disable_early_printk(void)
> {
> + if (!early_console_initialized)
> + return;
> unregister_console(&udbg_console);
> + early_console_initialized = 0;
> }
>
> /* called by setup_system */
> void register_early_udbg_console(void)
> {
> + early_console_initialized = 1;
> register_console(&udbg_console);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ppc64: iSeries early printk breakage
2005-09-07 11:04 ` Milton Miller
@ 2005-09-08 1:01 ` Stephen Rothwell
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2005-09-08 1:01 UTC (permalink / raw)
To: Milton Miller
Cc: paulus, linuxppc64-dev, linux-kernel, edwardsg, anton, torvalds
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
On Wed, 7 Sep 2005 06:04:36 -0500 Milton Miller <miltonm@bga.com> wrote:
>
> Does anything actually break without this patch?
Yes, an iSeries box will not boot.
> My reading of unregister_console says we will acquire
> the console semaphore, walk the list, fail to find the
> console, relase the semaphore, and return.
Consider the case that console_drivers == NULL (because we have never called register_console).
unregister_console dereferences console_drivers ...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-09-08 1:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-07 9:52 [PATCH] ppc64: iSeries early printk breakage Stephen Rothwell
2005-09-07 11:04 ` Milton Miller
2005-09-08 1:01 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®