fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / ia64 / dig / setup.c
index d58003f..93048b2 100644 (file)
@@ -8,14 +8,13 @@
  * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
  * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
  */
-#include <linux/config.h>
 
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/string.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/console.h>
 #include <linux/timex.h>
 #include <linux/sched.h>
 #include <asm/machvec.h>
 #include <asm/system.h>
 
-/*
- * This is here so we can use the CMOS detection in ide-probe.c to
- * determine what drives are present.  In theory, we don't need this
- * as the auto-detection could be done via ide-probe.c:do_probe() but
- * in practice that would be much slower, which is painful when
- * running in the simulator.  Note that passing zeroes in DRIVE_INFO
- * is sufficient (the IDE driver will autodetect the drive geometry).
- */
-char drive_info[4*16];
+#include <xen/xencons.h>
 
 void __init
 dig_setup (char **cmdline_p)
@@ -78,9 +69,19 @@ dig_setup (char **cmdline_p)
        screen_info.orig_video_mode = 3;        /* XXX fake */
        screen_info.orig_video_isVGA = 1;       /* XXX fake */
        screen_info.orig_video_ega_bx = 3;      /* XXX fake */
-}
+#ifdef CONFIG_XEN
+       if (!is_running_on_xen() || !is_initial_xendomain())
+               return;
 
-void __init
-dig_irq_init (void)
-{
+       if (xen_start_info->console.dom0.info_size >=
+           sizeof(struct dom0_vga_console_info)) {
+               const struct dom0_vga_console_info *info =
+                       (struct dom0_vga_console_info *)(
+                               (char *)xen_start_info +
+                               xen_start_info->console.dom0.info_off);
+               dom0_init_screen_info(info);
+       }
+       xen_start_info->console.domU.mfn = 0;
+       xen_start_info->console.domU.evtchn = 0;
+#endif
 }