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 4/4] macvec + sn2 support

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 4/4] macvec + sn2 support
From: Jes Sorensen <jes@xxxxxxx>
Date: Fri, 24 Nov 2006 16:40:07 +0100
Delivery-date: Fri, 24 Nov 2006 07:40:15 -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 enables the building of sn2 support and fixes the little
bits and pieces left required for that to build.

The changes to page.h simply make that code resemble more whats in
the upstream Linux kernel.

Cheers,
Jes

Changes required to build SN2 and machvec support.

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

---
 arch/ia64/Makefile                      |    2 ++
 arch/ia64/linux/Makefile                |    1 +
 include/asm-ia64/config.h               |   18 ++++++++++++++++--
 include/asm-ia64/linux-xen/asm/page.h   |   12 ++++++++----
 include/asm-ia64/linux-xen/asm/system.h |    1 +
 include/asm-ia64/linux-xen/asm/types.h  |    8 ++++++++
 6 files changed, 36 insertions(+), 6 deletions(-)

Index: xen/arch/ia64/Makefile
===================================================================
--- xen.orig/arch/ia64/Makefile
+++ xen/arch/ia64/Makefile
@@ -2,6 +2,8 @@ subdir-y += xen
 subdir-y += vmx
 subdir-y += linux
 subdir-y += linux-xen
+subdir-y += sn
+subdir-y += dig
 
 $(TARGET)-syms: linux-xen/head.o $(ALL_OBJS) xen.lds.s
        $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
Index: xen/arch/ia64/linux/Makefile
===================================================================
--- xen.orig/arch/ia64/linux/Makefile
+++ xen/arch/ia64/linux/Makefile
@@ -13,6 +13,7 @@ obj-y += machvec.o
 obj-y += memcpy_mck.o
 obj-y += memset.o
 obj-y += strlen.o
+obj-y += io.o
 
 obj-y += __divsi3.o
 obj-y += __udivsi3.o
Index: xen/include/asm-ia64/config.h
===================================================================
--- xen.orig/include/asm-ia64/config.h
+++ xen/include/asm-ia64/config.h
@@ -8,8 +8,10 @@
 // manufactured from component pieces
 
 // defined in linux/arch/ia64/defconfig
-//#define      CONFIG_IA64_GENERIC
-#define        CONFIG_IA64_HP_SIM
+#define        CONFIG_IA64_GENERIC
+//#define      CONFIG_IA64_HP_SIM
+#define CONFIG_HZ      32
+
 #define        CONFIG_IA64_L1_CACHE_SHIFT 7
 // needed by include/asm-ia64/page.h
 #define        CONFIG_IA64_PAGE_SIZE_16KB      // 4KB doesn't work?!?
@@ -144,6 +146,7 @@ extern int smp_num_siblings;
 // avoid redefining task_struct in asm/current.h
 #define task_struct vcpu
 
+#if 0  /* ARGHHHHHHHHHH */
 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
 #define platform_inb   __ia64_inb
 #define platform_inw   __ia64_inw
@@ -151,6 +154,7 @@ extern int smp_num_siblings;
 #define platform_outb  __ia64_outb
 #define platform_outw  __ia64_outw
 #define platform_outl  __ia64_outl
+#endif
 
 #include <xen/cache.h>
 #ifndef CONFIG_SMP
@@ -203,6 +207,16 @@ void sort_main_extable(void);
 // Deprivated linux inf and put here for short time compatibility
 #define kmalloc(s, t) xmalloc_bytes((s))
 #define kfree(s) xfree((s))
+#define kzalloc(size, flags)                           \
+({                                                     \
+       unsigned char *mem;                             \
+       mem = (unsigned char *)xmalloc_bytes(size);     \
+       if (mem)                                        \
+               memset(mem, 0, size);                   \
+       (void *)mem;                                    \
+})
+#define kcalloc(n, size, flags)                kzalloc(n * size, flags)
+#define alloc_bootmem_node(pg, size)   xmalloc_bytes(size)
 
 // see common/keyhandler.c
 #define        nop()   asm volatile ("nop 0")
Index: xen/include/asm-ia64/linux-xen/asm/page.h
===================================================================
--- xen.orig/include/asm-ia64/linux-xen/asm/page.h
+++ xen/include/asm-ia64/linux-xen/asm/page.h
@@ -12,6 +12,10 @@
 #include <asm/intrinsics.h>
 #include <asm/types.h>
 
+#define RGN_SHIFT      61
+#define RGN_BASE(r)    (r << RGN_SHIFT)
+#define RGN_BITS       RGN_BASE(-1)
+
 /*
  * PAGE_SHIFT determines the actual kernel page size.
  */
@@ -36,10 +40,10 @@
 
 #define RGN_MAP_LIMIT  ((1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE)      /* per 
region addr limit */
 
+# define RGN_HPAGE             (4UL)   /* note: this is hardcoded in 
reload_context()!*/
 #ifdef CONFIG_HUGETLB_PAGE
-# define REGION_HPAGE          (4UL)   /* note: this is hardcoded in 
reload_context()!*/
 # define REGION_SHIFT          61
-# define HPAGE_REGION_BASE     (REGION_HPAGE << REGION_SHIFT)
+# define HPAGE_REGION_BASE     (RGN_HPAGE << REGION_SHIFT)
 # define HPAGE_SHIFT           hpage_shift
 # define HPAGE_SHIFT_DEFAULT   28      /* check ia64 SDM for architecture 
supported size */
 # define HPAGE_SIZE            (__IA64_UL_CONST(1) << HPAGE_SHIFT)
@@ -141,8 +145,8 @@ typedef union ia64_va {
                                 | (REGION_OFFSET(x) >> 
(HPAGE_SHIFT-PAGE_SHIFT)))
 # define HUGETLB_PAGE_ORDER    (HPAGE_SHIFT - PAGE_SHIFT)
 # define is_hugepage_only_range(mm, addr, len)         \
-        (REGION_NUMBER(addr) == REGION_HPAGE &&        \
-         REGION_NUMBER((addr)+(len)-1) == REGION_HPAGE)
+        (REGION_NUMBER(addr) == RGN_HPAGE &&   \
+         REGION_NUMBER((addr)+(len)-1) == RGN_HPAGE)
 extern unsigned int hpage_shift;
 #endif
 
Index: xen/include/asm-ia64/linux-xen/asm/system.h
===================================================================
--- xen.orig/include/asm-ia64/linux-xen/asm/system.h
+++ xen/include/asm-ia64/linux-xen/asm/system.h
@@ -190,6 +190,7 @@ do {                                                        
        \
 #ifdef XEN
 #define local_irq_is_enabled() (!irqs_disabled())
 extern struct vcpu *ia64_switch_to(struct vcpu *next_task);
+#define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
 #else
 #ifdef __KERNEL__
 
Index: xen/include/asm-ia64/linux-xen/asm/types.h
===================================================================
--- xen.orig/include/asm-ia64/linux-xen/asm/types.h
+++ xen/include/asm-ia64/linux-xen/asm/types.h
@@ -74,6 +74,14 @@ typedef unsigned short kmem_bufctl_t;
 
 #ifdef XEN
 #include <asm/xentypes.h>
+
+#ifndef __ASSEMBLY__
+typedef unsigned int gfp_t;
+typedef u64 resource_size_t;
+typedef u32 dev_t;
+typedef unsigned int mode_t;
+#define THIS_MODULE    NULL
+#endif
 #endif
 
 #endif /* _ASM_IA64_TYPES_H */
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [patch 4/4] macvec + sn2 support, Jes Sorensen <=