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] use ia64_platform_is and do not init ns16550 on

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [patch] use ia64_platform_is and do not init ns16550 on sn2
From: Jes Sorensen <jes@xxxxxxx>
Date: Fri, 15 Dec 2006 10:39:36 +0100
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 15 Dec 2006 01:39:35 -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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060527)
Hi,

This patch changes kernel_start() to use ia64_platform_is() and not
init the 16550 driver on sn2. In addtion this eliminates the need for
the old hpsim test function.

This patch is relative to the sn2+machvec branch!

Signed-off-by: Jes Sorensen <jes@xxxxxxx>

Cheers,
Jes

# HG changeset patch
# User jes@xxxxxxxxxxxxxxxx
# Date 1166175419 -3600
# Node ID 2a5baff73732c6942f7cbfb8eedd713011f27fa0
# Parent  07a3d5e8524daf5746902de72a1760a87215d981
Use ia64_platform_is() to detect machine type in start_kernel() and
avoid initializing ns16550 driver on sn2.

This eliminates the need for the old is_platform_hp_ski() hack.

diff -r 07a3d5e8524d -r 2a5baff73732 xen/arch/ia64/xen/xenmisc.c
--- a/xen/arch/ia64/xen/xenmisc.c       Fri Dec 15 09:18:07 2006 +0100
+++ b/xen/arch/ia64/xen/xenmisc.c       Fri Dec 15 10:36:59 2006 +0100
@@ -37,22 +37,6 @@ void hpsim_setup(char **x)
 
 // called from mem_init... don't think s/w I/O tlb is needed in Xen
 //void swiotlb_init(void) { }  ...looks like it IS needed
-
-long
-is_platform_hp_ski(void)
-{
-       int i;
-       long cpuid[6];
-
-       for (i = 0; i < 5; ++i)
-               cpuid[i] = ia64_get_cpuid(i);
-       if ((cpuid[0] & 0xff) != 'H') return 0;
-       if ((cpuid[3] & 0xff) != 0x4) return 0;
-       if (((cpuid[3] >> 8) & 0xff) != 0x0) return 0;
-       if (((cpuid[3] >> 16) & 0xff) != 0x0) return 0;
-       if (((cpuid[3] >> 24) & 0x7) != 0x7) return 0;
-       return 1;
-}
 
 struct pt_regs *guest_cpu_user_regs(void) { return vcpu_regs(current); }
 
diff -r 07a3d5e8524d -r 2a5baff73732 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Fri Dec 15 09:18:07 2006 +0100
+++ b/xen/arch/ia64/xen/xensetup.c      Fri Dec 15 10:36:59 2006 +0100
@@ -26,6 +26,7 @@
 #include <asm/vmx.h>
 #include <linux/efi.h>
 #include <asm/iosapic.h>
+#include <asm/sn/simulator.h>
 
 unsigned long xenheap_phys_end, total_pages;
 
@@ -39,7 +40,6 @@ int find_max_pfn (unsigned long, unsigne
 int find_max_pfn (unsigned long, unsigned long, void *);
 
 /* FIXME: which header these declarations should be there ? */
-extern long is_platform_hp_ski(void);
 extern void early_setup_arch(char **);
 extern void late_setup_arch(char **);
 extern void hpsim_serial_init(void);
@@ -257,15 +257,19 @@ void start_kernel(void)
     /* Be sure the struct shared_info size is <= XSI_SIZE.  */
     BUILD_BUG_ON(sizeof(struct shared_info) > XSI_SIZE);
 
-    running_on_sim = is_platform_hp_ski();
     /* Kernel may be relocated by EFI loader */
     xen_pstart = ia64_tpa(KERNEL_START);
 
     early_setup_arch(&cmdline);
 
     /* We initialise the serial devices very early so we can get debugging. */
-    if (running_on_sim) hpsim_serial_init();
-    else {
+    if (ia64_platform_is("hpsim")) {
+       running_on_sim = 1;
+       hpsim_serial_init();
+    } else if (ia64_platform_is("sn2")) {
+       if (IS_RUNNING_ON_SIMULATOR())
+           running_on_sim = 1;
+    } else {
        ns16550_init(0, &ns16550_com1);
        /* Also init com2 for Tiger4. */
        ns16550_com2.io_base = 0x2f8;
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>