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] [CONSOLE] Set vga_con before using it

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] [CONSOLE] Set vga_con before using it
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Thu, 09 Aug 2007 11:06:31 +0900
Cc: Alex Williamson <alex.williamson@xxxxxx>
Delivery-date: Wed, 08 Aug 2007 19:05:39 -0700
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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
It seems that before the code checks the value of vga_con,
any code that sets it should be run.

Is this correct?

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Index: linux-2.6.18-xen.hg/arch/ia64/kernel/setup.c
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/kernel/setup.c   2007-08-09 
09:54:07.000000000 +0900
+++ linux-2.6.18-xen.hg/arch/ia64/kernel/setup.c        2007-08-09 
09:55:31.000000000 +0900
@@ -597,6 +597,24 @@ 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
+       }
+#endif
+
 #ifdef CONFIG_XEN
        if (is_running_on_xen()) {
                printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld "
@@ -648,24 +666,6 @@ setup_arch (char **cmdline_p)
        xencons_early_setup();
 #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()) {

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

<Prev in Thread] Current Thread [Next in Thread>