From: Chuck Ebbert <76306.1226@compuserve.com>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: [patch] x86: clean up early_printk output
Date: Fri, 24 Feb 2006 19:07:00 -0500 [thread overview]
Message-ID: <200602241909_MC3-1-B93E-25B@compuserve.com> (raw)
early_printk() starts output on the second screen line and doesn't
clear the rest of the line when it hits a newline char. When there
is already a BIOS message there, it becomes hard to read. Change
this so it starts on the first line and clears to EOL upon hitting
newline.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
--- 2.6.16-rc4-64.orig/arch/x86_64/kernel/early_printk.c
+++ 2.6.16-rc4-64/arch/x86_64/kernel/early_printk.c
@@ -21,7 +21,15 @@
#define MAX_XPOS max_xpos
static int max_ypos = 25, max_xpos = 80;
-static int current_ypos = 1, current_xpos = 0;
+static int current_ypos, current_xpos; /* 0,0 */
+
+static noinline void clear_to_eol(int xpos, int ypos)
+{
+ int i;
+
+ for (i = xpos; i < MAX_XPOS; i++)
+ writew(0x720, VGABASE + 2*(MAX_XPOS*ypos + i));
+}
static void early_vga_write(struct console *con, const char *str, unsigned n)
{
@@ -37,11 +45,11 @@ static void early_vga_write(struct conso
VGABASE + 2*(MAX_XPOS*j + i));
}
}
- for (i = 0; i < MAX_XPOS; i++)
- writew(0x720, VGABASE + 2*(MAX_XPOS*j + i));
+ clear_to_eol(0, j);
current_ypos = MAX_YPOS-1;
}
if (c == '\n') {
+ clear_to_eol(current_xpos, current_ypos);
current_xpos = 0;
current_ypos++;
} else if (c != '\r') {
--
Chuck
"Equations are the Devil's sentences." --Stephen Colbert
next reply other threads:[~2006-02-25 0:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-25 0:07 Chuck Ebbert [this message]
2006-02-25 2:07 ` Andrew Morton
2006-02-25 4:29 ` Andi Kleen
2006-02-25 6:22 Chuck Ebbert
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=200602241909_MC3-1-B93E-25B@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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