From: Dave Hansen <haveblue@us.ibm.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: David Woodhouse <dwmw2@redhat.com>
Subject: Re: [PATCH] (3/3) early printk for 386
Date: Mon, 02 Dec 2002 16:15:15 -0800 [thread overview]
Message-ID: <3DEBF793.90600@us.ibm.com> (raw)
In-Reply-To: <3DEBF6BB.7000901@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
Finally, do early printk for i386. Only serial is supported for now,
but there is nothing to stop other console types from being added.
arch/i386/kernel/setup.c | 14 ++++++++++++++
drivers/serial/8250.c | 3 +++
kernel/printk.c | 2 +-
3 files changed, 18 insertions(+), 1 deletion(-)
--
Dave Hansen
haveblue@us.ibm.com
[-- Attachment #2: C-early-printk-i386-0.patch --]
[-- Type: text/plain, Size: 2102 bytes --]
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.970 -> 1.971
# drivers/serial/8250.c 1.24 -> 1.25
# arch/i386/kernel/setup.c 1.64 -> 1.65
# kernel/printk.c 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/12/02 haveblue@elm3b96.(none) 1.971
# 2-3
# --------------------------------------------
#
diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c Mon Dec 2 16:00:27 2002
+++ b/arch/i386/kernel/setup.c Mon Dec 2 16:00:27 2002
@@ -554,6 +554,20 @@
return 1;
}
+static int __init early_printk_setup(char* arg)
+{
+ /* early printk only works for serial ports now */
+ if (strncmp(arg,"ttyS",4) && strncmp(arg,"/dev/ttyS",9))
+ return 0;
+
+ console_setup(arg);
+ serial8250_console_init();
+
+ printk( "early printk enabled \n" );
+ return 1;
+}
+
+__ordered_setup(SETUP_ARCH_BEGIN,"console=",early_printk_setup);
__ordered_setup(SETUP_ARCH_LATE, "mem=nopentium", arch_setup_mem_nopentium);
__ordered_setup(SETUP_ARCH_LATE, "mem=exactmap", arch_setup_mem_exactmap);
__ordered_setup(SETUP_ARCH_LATE, "mem=", arch_setup_mem);
diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c
--- a/drivers/serial/8250.c Mon Dec 2 16:00:27 2002
+++ b/drivers/serial/8250.c Mon Dec 2 16:00:27 2002
@@ -1910,6 +1910,9 @@
void __init serial8250_console_init(void)
{
+ if (serial8250_console.flags & CON_ENABLED)
+ return;
+
serial8250_isa_init_ports();
register_console(&serial8250_console);
}
diff -Nru a/kernel/printk.c b/kernel/printk.c
--- a/kernel/printk.c Mon Dec 2 16:00:27 2002
+++ b/kernel/printk.c Mon Dec 2 16:00:27 2002
@@ -99,7 +99,7 @@
/*
* Setup a list of consoles. Called from init/main.c
*/
-static int __init console_setup(char *str)
+int __init console_setup(char *str)
{
struct console_cmdline *c;
char name[sizeof(c->name)];
prev parent reply other threads:[~2002-12-03 0:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-03 0:11 [PATCH] (1/3) allow earlier command line parsing Dave Hansen
2002-12-03 0:15 ` [PATCH] (2/3) do early command line parsing for 386 Dave Hansen
2002-12-03 0:15 ` Dave Hansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DEBF793.90600@us.ibm.com \
--to=haveblue@us.ibm.com \
--cc=dwmw2@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome