This patch re-orders setup_arch in xenlinux slightly. This allows us
to check if conswitchp was setup early by the HCDP code to point to a
VGA console (the previous patch leaves efi.hcdp in place for dom0 if the
primary console is VGA). Also fix a bug w/ zero'ing the preferred
console name string.
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
diff -r b64323b3a963 arch/ia64/kernel/setup.c
--- a/arch/ia64/kernel/setup.c Thu Jul 19 16:02:02 2007 -0600
+++ b/arch/ia64/kernel/setup.c Tue Jul 24 15:02:25 2007 -0600
@@ -526,22 +526,6 @@ setup_arch (char **cmdline_p)
acpi_boot_init();
#endif
-#ifdef CONFIG_VT
- if (!conswitchp) {
-# if defined(CONFIG_DUMMY_CONSOLE)
- conswitchp = &dummy_con;
-# endif
-# if defined(CONFIG_VGA_CONSOLE)
- /*
- * Non-legacy systems may route legacy VGA MMIO range to system
- * memory. vga_con probes the MMIO hole, so memory looks like
- * a VGA device to it. The EFI memory map can tell us if it's
- * memory so we can avoid this problem.
- */
- if (efi_mem_type(0xA0000) != EFI_CONVENTIONAL_MEMORY)
- conswitchp = &vga_con;
-# endif
- }
#ifdef CONFIG_XEN
if (is_running_on_xen()) {
shared_info_t *s = HYPERVISOR_shared_info;
@@ -553,9 +537,6 @@ setup_arch (char **cmdline_p)
xen_start_info->nr_pages, xen_start_info->flags);
if (!is_initial_xendomain()) {
-#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE)
- conswitchp = NULL;
-#endif
}
/*
@@ -567,7 +548,8 @@ setup_arch (char **cmdline_p)
char *p, *q, name[5];
int offset = 0;
- if (is_initial_xendomain())
+ memset(name, 0, sizeof(name));
+ if (is_initial_xendomain() && conswitchp != &vga_con)
strncpy(name, "ttyS", 4);
else
strncpy(name, "tty", 3);
@@ -599,13 +581,33 @@ setup_arch (char **cmdline_p)
}
xencons_early_setup();
#endif
-#endif
-
+
+#ifdef CONFIG_VT
+ if (!conswitchp) {
+# if defined(CONFIG_DUMMY_CONSOLE)
+ conswitchp = &dummy_con;
+# endif
+# if defined(CONFIG_VGA_CONSOLE)
+ /*
+ * Non-legacy systems may route legacy VGA MMIO range to system
+ * memory. vga_con probes the MMIO hole, so memory looks like
+ * a VGA device to it. The EFI memory map can tell us if it's
+ * memory so we can avoid this problem.
+ */
+ if (efi_mem_type(0xA0000) != EFI_CONVENTIONAL_MEMORY)
+ conswitchp = &vga_con;
+# endif
+ }
+#endif
/* enable IA-64 Machine Check Abort Handling unless disabled */
#ifdef CONFIG_XEN
- if (is_running_on_xen() && !is_initial_xendomain())
+ if (is_running_on_xen() && !is_initial_xendomain()) {
nomca = 1;
+#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE)
+ conswitchp = NULL;
+#endif
+ }
#endif
if (!nomca)
ia64_mca_init();
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|