kdb
[Top] [All Lists]

[PATCH] KDB for ppc64 - write to OF stdout instead of console

To: anton@xxxxxxxxx
Subject: [PATCH] KDB for ppc64 - write to OF stdout instead of console
From: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
Date: Tue, 18 May 2004 19:07:54 +0500
Cc: kdb@xxxxxxxxxxx, linuxppc64-dev@xxxxxxxxxxxxxxxxxx, linas@xxxxxxxxxxxxxx, olof@xxxxxxxxxxxxxx, vosburgh@xxxxxxxxxx
Reply-to: ananth@xxxxxxxxxx
Sender: kdb-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4i
Hi Anton,

KDB on ppc64 currently reads input from the OF-stdout (udbg_getc_poll)
while the output (kdb_printf) is through the registered consoles. This
leads to problems when working on LPAR mode, where, input is accepted
through the hmc vterm while output is displayed on the serial console.

Patch inlined removes KDB's dependency on consoles completely for I/O.
With this patch, we use the OF stdout for both input and output. 

This should fix the KDB configuration/usage confusions on ppc64 for 
both LPAR and non-LPAR modes.

Please apply!


Thanks,
Ananth
-- 
Ananth Narayan
Linux Technology Center,
IBM Software Lab, INDIA


diff -Naurp temp/ameslab/kdb/kdb_io.c ameslab/kdb/kdb_io.c
--- temp/ameslab/kdb/kdb_io.c   2004-05-04 02:07:51.000000000 -0700
+++ ameslab/kdb/kdb_io.c        2004-05-17 23:37:11.373470688 -0700
@@ -55,6 +55,9 @@
 static struct console *kdbcons;
 #endif
 
+#ifdef CONFIG_PPC64
+#include <asm/udbg.h>
+#endif
 
 #define CMD_BUFLEN 256
 char kdb_prompt_str[CMD_BUFLEN];
@@ -521,6 +524,13 @@ kdb_printf(const char *fmt, ...)
                prom_printf("%s", kdb_buffer);
        else
 #endif
+               
+#ifdef CONFIG_PPC64
+       if (udbg_write)
+               udbg_write(kdb_buffer, strlen(kdb_buffer));
+       else
+#endif
+
        while (c) {
                c->write(c, kdb_buffer, strlen(kdb_buffer));
                c = c->next;
@@ -569,6 +579,13 @@ kdb_printf(const char *fmt, ...)
                        prom_printf("%s", moreprompt);
                else
 #endif
+                       
+#ifdef CONFIG_PPC64
+               if (udbg_write)
+                       udbg_write(moreprompt, strlen(moreprompt));
+               else
+#endif
+                       
                while (c) {
                        c->write(c, moreprompt, strlen(moreprompt));
                        c = c->next;
---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
<Prev in Thread] Current Thread [Next in Thread>