WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] Remove use of hpsim console

To: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH] Remove use of hpsim console
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Tue, 06 Feb 2007 15:00:00 -0700
Delivery-date: Tue, 06 Feb 2007 14:00:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
  We've been using the hpsim console for early dom0/domU bootup.  This
provides an early boot console via Xen, but directs early boot messages
to the wrong place a for production system.  The patch below removes our
usage of the hpsim console and adds smarts to autodetect where the
console should go when not specified.  Ideally, there shouldn't be any
behavioral change other than early boot messages aren't printed out via
Xen.  As a bonus, we shouldn't need to specify a console= for domUs
using the default xencons outputs.  It's easy to cause problems
tinkering with the console setup, so please give this a test.  Comments
welcome.  Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r b3ae332e6dbd linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Tue Feb 06 09:28:07 
2007 -0700
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Tue Feb 06 14:41:49 
2007 -0700
@@ -375,16 +375,6 @@ early_console_setup (char *cmdline)
 {
        int earlycons = 0;
 
-#ifdef CONFIG_XEN
-#ifndef CONFIG_IA64_HP_SIM
-       if (is_running_on_xen()) {
-               extern struct console hpsim_cons;
-               hpsim_cons.flags |= CON_BOOT;
-               register_console(&hpsim_cons);
-               earlycons++;
-       }
-#endif
-#endif
 #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
        {
                extern int sn_serial_console_early_setup(void);
@@ -557,6 +547,45 @@ setup_arch (char **cmdline_p)
 #if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE)
                        conswitchp = NULL;
 #endif
+               }
+               
+               /*
+                * Add a preferred console to match xencons.  This should
+                * do the right thing on both dom0 & domU, but it depends
+                * on matching xencons behavior.
+                */
+               if (!strstr(*cmdline_p, "console=")) {
+                       char *p, *q, name[5];
+                       int offset = 0;
+
+                       if (is_initial_xendomain())
+                               strncpy(name, "ttyS", 4);
+                       else
+                               strncpy(name, "tty", 3);
+
+                       p = strstr(*cmdline_p, "xencons=");
+
+                       if (p) {
+                               p += 8;
+                               if (!strncmp(p, "ttyS", 4)) {
+                                       strncpy(name, p, 4);
+                                       p += 4;
+                                       offset = simple_strtol(p, &q, 10);
+                                       if (p == q)
+                                               offset = 0;
+                               } else if (!strncmp(p, "tty", 3) ||
+                                          !strncmp(p, "xvc", 3)) {
+                                       strncpy(name, p, 3);
+                                       p += 3;
+                                       offset = simple_strtol(p, &q, 10);
+                                       if (p == q)
+                                               offset = 0;
+                               } else if (!strncmp(p, "off", 3))
+                                       offset = -1;
+                       }
+
+                       if (offset >= 0)
+                               add_preferred_console(name, offset, NULL);
                }
        }
        xencons_early_setup();
diff -r b3ae332e6dbd linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile
--- a/linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile    Tue Feb 06 09:28:07 
2007 -0700
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#
-# ia64/platform/hp/sim/Makefile
-#
-# Copyright (C) 2002 Hewlett-Packard Co.
-#      David Mosberger-Tang <davidm@xxxxxxxxxx>
-# Copyright (C) 1999 Silicon Graphics, Inc.
-# Copyright (C) Srinivasa Thirumalachar (sprasad@xxxxxxxxxxxx)
-#
-
-obj-y := hpsim_irq.o hpsim_setup.o hpsim.o
-obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
-
-obj-$(CONFIG_HP_SIMETH)        += simeth.o
-obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
-obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
-obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
-obj-$(CONFIG_XEN) += simserial.o
-obj-$(CONFIG_XEN) += hpsim_console.o



_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] Remove use of hpsim console, Alex Williamson <=