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 5/6] SN2+Machvec support - extra changes

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 5/6] SN2+Machvec support - extra changes
From: jes@xxxxxxx
Date: Fri, 01 Dec 2006 15:13:08 +0100
Delivery-date: Fri, 01 Dec 2006 06:14:03 -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>
References: <20061201141303.272189000@xxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.44-17
More changes to support machine vectors.

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

---
 arch/ia64/xen/irq.c                            |    7 +++++
 include/asm-ia64/config.h                      |   23 +++++++++-------
 include/asm-ia64/linux-xen/asm/machvec_dig.h   |   33 ++++++++++++-----------
 include/asm-ia64/linux-xen/asm/machvec_hpzx1.h |   35 +++++++++++++------------
 4 files changed, 56 insertions(+), 42 deletions(-)

Index: xen/arch/ia64/xen/irq.c
===================================================================
--- xen.orig/arch/ia64/xen/irq.c
+++ xen/arch/ia64/xen/irq.c
@@ -48,6 +48,13 @@
 #include <xen/event.h>
 #define apicid_to_phys_cpu_present(x)  1
 
+#ifdef CONFIG_IA64_GENERIC
+unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
+{
+       return (unsigned int) vec;
+}
+#endif
+
 /*
  * Linux has a controller-independent x86 interrupt architecture.
  * every controller has a 'controller-template', that is used
Index: xen/include/asm-ia64/config.h
===================================================================
--- xen.orig/include/asm-ia64/config.h
+++ xen/include/asm-ia64/config.h
@@ -8,8 +8,9 @@
 // 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_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,14 +145,6 @@ extern int smp_num_siblings;
 // avoid redefining task_struct in asm/current.h
 #define task_struct vcpu
 
-// linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
-#define platform_inb   __ia64_inb
-#define platform_inw   __ia64_inw
-#define platform_inl   __ia64_inl
-#define platform_outb  __ia64_outb
-#define platform_outw  __ia64_outw
-#define platform_outl  __ia64_outl
-
 #include <xen/cache.h>
 #ifndef CONFIG_SMP
 #define __cacheline_aligned_in_smp
@@ -203,6 +196,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/machvec_dig.h
===================================================================
--- xen.orig/include/asm-ia64/linux-xen/asm/machvec_dig.h
+++ xen/include/asm-ia64/linux-xen/asm/machvec_dig.h
@@ -15,25 +15,26 @@ extern ia64_mv_setup_t dig_setup;
 /*
  * All the World is a PC .... yay! yay! yay!
  */
-#define platform_setup                 machvec_noop
-#define platform_dma_init              machvec_noop
-#define platform_dma_alloc_coherent    machvec_noop
-#define platform_dma_free_coherent     machvec_noop
-#define platform_dma_map_single                machvec_noop
-#define platform_dma_unmap_single      machvec_noop
-#define platform_dma_map_sg            machvec_noop
-#define platform_dma_unmap_sg          machvec_noop
+extern ia64_mv_setup_t hpsim_setup;
+#define platform_setup                         hpsim_setup
+
+#define platform_dma_init                      machvec_noop
+#define platform_dma_alloc_coherent            machvec_noop
+#define platform_dma_free_coherent             machvec_noop
+#define platform_dma_map_single                        machvec_noop
+#define platform_dma_unmap_single              machvec_noop
+#define platform_dma_map_sg                    machvec_noop
+#define platform_dma_unmap_sg                  machvec_noop
 #define platform_dma_sync_single_for_cpu       machvec_noop
-#define platform_dma_sync_sg_for_cpu   machvec_noop
+#define platform_dma_sync_sg_for_cpu           machvec_noop
 #define platform_dma_sync_single_for_device    machvec_noop
-#define platform_dma_sync_sg_for_device        machvec_noop
-#define platform_dma_mapping_error     machvec_noop
-#define platform_dma_supported         machvec_noop
-#define platform_local_vector_to_irq   machvec_noop
+#define platform_dma_sync_sg_for_device                machvec_noop
+#define platform_dma_mapping_error             machvec_noop
+#define platform_dma_supported                 machvec_noop
 
-#define platform_pci_get_legacy_mem    machvec_noop
-#define platform_pci_legacy_read       machvec_noop
-#define platform_pci_legacy_write      machvec_noop
+#define platform_pci_get_legacy_mem            machvec_noop
+#define platform_pci_legacy_read               machvec_noop
+#define platform_pci_legacy_write              machvec_noop
 #else
 #define platform_setup         dig_setup
 #endif
Index: xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h
===================================================================
--- xen.orig/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h
+++ xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h
@@ -20,25 +20,28 @@ extern ia64_mv_dma_mapping_error    sba_dma
  */
 #define platform_name                          "hpzx1"
 #ifdef XEN
-#define platform_setup                 machvec_noop
-#define platform_dma_init              machvec_noop
-#define platform_dma_alloc_coherent    machvec_noop
-#define platform_dma_free_coherent     machvec_noop
-#define platform_dma_map_single                machvec_noop
-#define platform_dma_unmap_single      machvec_noop
-#define platform_dma_map_sg            machvec_noop
-#define platform_dma_unmap_sg          machvec_noop
+extern ia64_mv_setup_t hpsim_setup;
+extern ia64_mv_irq_init_t hpsim_irq_init;
+#define platform_setup                         hpsim_setup
+#define platform_irq_init                      hpsim_irq_init
+
+#define platform_dma_init                      machvec_noop
+#define platform_dma_alloc_coherent            machvec_noop
+#define platform_dma_free_coherent             machvec_noop
+#define platform_dma_map_single                        machvec_noop
+#define platform_dma_unmap_single              machvec_noop
+#define platform_dma_map_sg                    machvec_noop
+#define platform_dma_unmap_sg                  machvec_noop
 #define platform_dma_sync_single_for_cpu       machvec_noop
-#define platform_dma_sync_sg_for_cpu   machvec_noop
+#define platform_dma_sync_sg_for_cpu           machvec_noop
 #define platform_dma_sync_single_for_device    machvec_noop
-#define platform_dma_sync_sg_for_device        machvec_noop
-#define platform_dma_mapping_error     machvec_noop
-#define platform_dma_supported         machvec_noop
-#define platform_local_vector_to_irq   machvec_noop
+#define platform_dma_sync_sg_for_device                machvec_noop
+#define platform_dma_mapping_error             machvec_noop
+#define platform_dma_supported                 machvec_noop
 
-#define platform_pci_get_legacy_mem    machvec_noop
-#define platform_pci_legacy_read       machvec_noop
-#define platform_pci_legacy_write      machvec_noop
+#define platform_pci_get_legacy_mem            machvec_noop
+#define platform_pci_legacy_read               machvec_noop
+#define platform_pci_legacy_write              machvec_noop
 #else
 #define platform_setup                         dig_setup
 #define platform_dma_init                      machvec_noop

--

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