ia64/xen-unstable

changeset 13899:81c4f90695a8

[IA64] Remove use of hpsim console

This makes all domain boot messages come out through xencons. Previously
the hpsim console allowed an early console via Xen. Also, make xencons
the preferred console unless a console is explicitly provided.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild2.aw
date Mon Feb 12 09:48:56 2007 -0700 (2007-02-12)
parents ad9bbd103034
children dea561992abe
files linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/hp/sim/Makefile	Fri Feb 09 18:19:24 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,18 +0,0 @@
     1.4 -#
     1.5 -# ia64/platform/hp/sim/Makefile
     1.6 -#
     1.7 -# Copyright (C) 2002 Hewlett-Packard Co.
     1.8 -#	David Mosberger-Tang <davidm@hpl.hp.com>
     1.9 -# Copyright (C) 1999 Silicon Graphics, Inc.
    1.10 -# Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
    1.11 -#
    1.12 -
    1.13 -obj-y := hpsim_irq.o hpsim_setup.o hpsim.o
    1.14 -obj-$(CONFIG_IA64_GENERIC) += hpsim_machvec.o
    1.15 -
    1.16 -obj-$(CONFIG_HP_SIMETH)	+= simeth.o
    1.17 -obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
    1.18 -obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o
    1.19 -obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
    1.20 -obj-$(CONFIG_XEN) += simserial.o
    1.21 -obj-$(CONFIG_XEN) += hpsim_console.o
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Fri Feb 09 18:19:24 2007 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Mon Feb 12 09:48:56 2007 -0700
     2.3 @@ -375,16 +375,6 @@ early_console_setup (char *cmdline)
     2.4  {
     2.5  	int earlycons = 0;
     2.6  
     2.7 -#ifdef CONFIG_XEN
     2.8 -#ifndef CONFIG_IA64_HP_SIM
     2.9 -	if (is_running_on_xen()) {
    2.10 -		extern struct console hpsim_cons;
    2.11 -		hpsim_cons.flags |= CON_BOOT;
    2.12 -		register_console(&hpsim_cons);
    2.13 -		earlycons++;
    2.14 -	}
    2.15 -#endif
    2.16 -#endif
    2.17  #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
    2.18  	{
    2.19  		extern int sn_serial_console_early_setup(void);
    2.20 @@ -558,6 +548,45 @@ setup_arch (char **cmdline_p)
    2.21  			conswitchp = NULL;
    2.22  #endif
    2.23  		}
    2.24 +		
    2.25 +		/*
    2.26 +		 * If a console= is NOT specified, we assume using the
    2.27 +		 * xencons console is desired.  By default, this is ttyS0
    2.28 +		 * for dom0 and tty0 for domU.
    2.29 +		 */
    2.30 +		if (!strstr(*cmdline_p, "console=")) {
    2.31 +			char *p, *q, name[5];
    2.32 +			int offset = 0;
    2.33 +
    2.34 +			if (is_initial_xendomain())
    2.35 +				strncpy(name, "ttyS", 4);
    2.36 +			else
    2.37 +				strncpy(name, "tty", 3);
    2.38 +
    2.39 +			p = strstr(*cmdline_p, "xencons=");
    2.40 +
    2.41 +			if (p) {
    2.42 +				p += 8;
    2.43 +				if (!strncmp(p, "ttyS", 4)) {
    2.44 +					strncpy(name, p, 4);
    2.45 +					p += 4;
    2.46 +					offset = simple_strtol(p, &q, 10);
    2.47 +					if (p == q)
    2.48 +						offset = 0;
    2.49 +				} else if (!strncmp(p, "tty", 3) ||
    2.50 +				           !strncmp(p, "xvc", 3)) {
    2.51 +					strncpy(name, p, 3);
    2.52 +					p += 3;
    2.53 +					offset = simple_strtol(p, &q, 10);
    2.54 +					if (p == q)
    2.55 +						offset = 0;
    2.56 +				} else if (!strncmp(p, "off", 3))
    2.57 +					offset = -1;
    2.58 +			}
    2.59 +
    2.60 +			if (offset >= 0)
    2.61 +				add_preferred_console(name, offset, NULL);
    2.62 +		}
    2.63  	}
    2.64  	xencons_early_setup();
    2.65  #endif