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-changelog

[Xen-changelog] [xen-unstable] [IA64] Machvec warning fixes

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Machvec warning fixes
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jan 2007 21:10:19 -0800
Delivery-date: Thu, 18 Jan 2007 21:10:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1166127949 25200
# Node ID 8a9b1b72af445224d3997e4e98a915ded13eae69
# Parent  ba79a17ff7153424b6c025a29013bc9c552028be
[IA64] Machvec warning fixes

The compiler doesn't like using machvec_noop for everything

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 xen/include/asm-ia64/linux-xen/asm/machvec.h       |  108 +++++++++++++++++++++
 xen/include/asm-ia64/linux-xen/asm/machvec_dig.h   |   34 +++---
 xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h |   34 +++---
 xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h   |   33 +++---
 4 files changed, 164 insertions(+), 45 deletions(-)

diff -r ba79a17ff715 -r 8a9b1b72af44 
xen/include/asm-ia64/linux-xen/asm/machvec.h
--- a/xen/include/asm-ia64/linux-xen/asm/machvec.h      Thu Dec 14 13:23:33 
2006 -0700
+++ b/xen/include/asm-ia64/linux-xen/asm/machvec.h      Thu Dec 14 13:25:49 
2006 -0700
@@ -84,6 +84,114 @@ machvec_noop_mm (struct mm_struct *mm)
 machvec_noop_mm (struct mm_struct *mm)
 {
 }
+
+#ifdef XEN
+#include <xen/lib.h>
+/*
+ * These should never get called, they just fill out the machine
+ * vectors and make the compiler happy.
+ */
+static inline void*
+machvec_noop_dma_alloc_coherent (struct device *dev, size_t size,
+                                 dma_addr_t *addr, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+       return (void *)0;
+}
+
+static inline void
+machvec_noop_dma_free_coherent (struct device *dev, size_t size,
+                                void *vaddr, dma_addr_t handle)
+{
+       panic("%s() called", __FUNCTION__);
+}
+
+static inline dma_addr_t
+machvec_noop_dma_map_single (struct device *dev, void *addr,
+                             size_t size, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+       return (dma_addr_t)0;
+}
+
+static inline void
+machvec_noop_dma_unmap_single (struct device *dev, dma_addr_t vaddr,
+                               size_t size, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+}
+
+static inline int
+machvec_noop_dma_map_sg (struct device *dev, struct scatterlist *sglist,
+                         int nents, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+       return 0;
+}
+
+static inline void
+machvec_noop_dma_unmap_sg (struct device *dev, struct scatterlist *sglist,
+                           int nents, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+}
+
+static inline void
+machvec_noop_dma_sync_single_for_cpu (struct device *dev, dma_addr_t vaddr,
+                                      size_t size, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+}
+
+#define machvec_noop_dma_sync_single_for_device                \
+       machvec_noop_dma_sync_single_for_cpu
+
+static inline void
+machvec_noop_dma_sync_sg_for_cpu (struct device *dev,
+                                  struct scatterlist *sglist,
+                                  int nents, int dir)
+{
+       panic("%s() called", __FUNCTION__);
+}
+
+#define machvec_noop_dma_sync_sg_for_device            \
+       machvec_noop_dma_sync_sg_for_cpu
+
+static inline int
+machvec_noop_dma_mapping_error (dma_addr_t dma_addr)
+{
+       panic("%s() called", __FUNCTION__);
+       return 1;
+}
+
+static inline int
+machvec_noop_dma_supported (struct device *dev, u64 mask)
+{
+       panic("%s() called", __FUNCTION__);
+       return 0;
+}
+
+static inline char*
+machvec_noop_pci_get_legacy_mem (struct pci_bus *bus)
+{
+       panic("%s() called", __FUNCTION__);
+       return 0;
+}
+
+static inline int
+machvec_noop_pci_legacy_read (struct pci_bus *bus, u16 port, u32 *val, u8 size)
+{
+       panic("%s() called", __FUNCTION__);
+       return 0;
+}
+
+static inline int
+machvec_noop_pci_legacy_write (struct pci_bus *bus, u16 port, u32 val, u8 size)
+{
+       panic("%s() called", __FUNCTION__);
+       return 0;
+}
+#endif
 
 extern void machvec_setup (char **);
 extern void machvec_timer_interrupt (int, void *, struct pt_regs *);
diff -r ba79a17ff715 -r 8a9b1b72af44 
xen/include/asm-ia64/linux-xen/asm/machvec_dig.h
--- a/xen/include/asm-ia64/linux-xen/asm/machvec_dig.h  Thu Dec 14 13:23:33 
2006 -0700
+++ b/xen/include/asm-ia64/linux-xen/asm/machvec_dig.h  Thu Dec 14 13:25:49 
2006 -0700
@@ -19,22 +19,26 @@ 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_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_dma_alloc_coherent            machvec_noop_dma_alloc_coherent
+#define platform_dma_free_coherent             machvec_noop_dma_free_coherent
+#define platform_dma_map_single                        
machvec_noop_dma_map_single
+#define platform_dma_unmap_single              machvec_noop_dma_unmap_single
+#define platform_dma_map_sg                    machvec_noop_dma_map_sg
+#define platform_dma_unmap_sg                  machvec_noop_dma_unmap_sg
+#define platform_dma_sync_single_for_cpu       \
+       machvec_noop_dma_sync_single_for_cpu
+#define platform_dma_sync_sg_for_cpu           \
+       machvec_noop_dma_sync_sg_for_cpu
+#define platform_dma_sync_single_for_device    \
+       machvec_noop_dma_sync_single_for_device
+#define platform_dma_sync_sg_for_device                \
+       machvec_noop_dma_sync_sg_for_device
+#define platform_dma_mapping_error             machvec_noop_dma_mapping_error
+#define platform_dma_supported                 machvec_noop_dma_supported
 
-#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_pci_get_legacy_mem
+#define platform_pci_legacy_read               machvec_noop_pci_legacy_read
+#define platform_pci_legacy_write              machvec_noop_pci_legacy_write
 #else
 #define platform_setup         dig_setup
 #endif
diff -r ba79a17ff715 -r 8a9b1b72af44 
xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h
--- a/xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h        Thu Dec 14 
13:23:33 2006 -0700
+++ b/xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h        Thu Dec 14 
13:25:49 2006 -0700
@@ -26,22 +26,26 @@ extern ia64_mv_irq_init_t hpsim_irq_init
 #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_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_dma_alloc_coherent            machvec_noop_dma_alloc_coherent
+#define platform_dma_free_coherent             machvec_noop_dma_free_coherent
+#define platform_dma_map_single                        
machvec_noop_dma_map_single
+#define platform_dma_unmap_single              machvec_noop_dma_unmap_single
+#define platform_dma_map_sg                    machvec_noop_dma_map_sg
+#define platform_dma_unmap_sg                  machvec_noop_dma_unmap_sg
+#define platform_dma_sync_single_for_cpu       \
+       machvec_noop_dma_sync_single_for_cpu
+#define platform_dma_sync_sg_for_cpu           \
+       machvec_noop_dma_sync_sg_for_cpu
+#define platform_dma_sync_single_for_device    \
+       machvec_noop_dma_sync_single_for_device
+#define platform_dma_sync_sg_for_device                \
+       machvec_noop_dma_sync_sg_for_device
+#define platform_dma_mapping_error             machvec_noop_dma_mapping_error
+#define platform_dma_supported                 machvec_noop_dma_supported
 
-#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_pci_get_legacy_mem
+#define platform_pci_legacy_read               machvec_noop_pci_legacy_read
+#define platform_pci_legacy_write              machvec_noop_pci_legacy_write
 #else
 #define platform_setup                         dig_setup
 #define platform_dma_init                      machvec_noop
diff -r ba79a17ff715 -r 8a9b1b72af44 
xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h
--- a/xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h  Thu Dec 14 13:23:33 
2006 -0700
+++ b/xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h  Thu Dec 14 13:25:49 
2006 -0700
@@ -110,9 +110,9 @@ extern ia64_mv_teardown_msi_irq_t   sn_tea
 #define platform_readq_relaxed         __sn_readq_relaxed
 #define platform_local_vector_to_irq   sn_local_vector_to_irq
 #ifdef XEN
-#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_pci_get_legacy_mem
+#define platform_pci_legacy_read       machvec_noop_pci_legacy_read
+#define platform_pci_legacy_write      machvec_noop_pci_legacy_write
 #else
 #define platform_pci_get_legacy_mem    sn_pci_get_legacy_mem
 #define platform_pci_legacy_read       sn_pci_legacy_read
@@ -120,18 +120,21 @@ extern ia64_mv_teardown_msi_irq_t sn_tea
 #endif
 #define platform_dma_init              machvec_noop
 #ifdef XEN
-#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_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_dma_alloc_coherent    machvec_noop_dma_alloc_coherent
+#define platform_dma_free_coherent     machvec_noop_dma_free_coherent
+#define platform_dma_map_single                machvec_noop_dma_map_single
+#define platform_dma_unmap_single      machvec_noop_dma_unmap_single
+#define platform_dma_map_sg            machvec_noop_dma_map_sg
+#define platform_dma_unmap_sg          machvec_noop_dma_unmap_sg
+#define platform_dma_sync_single_for_cpu       \
+       machvec_noop_dma_sync_single_for_cpu
+#define platform_dma_sync_sg_for_cpu           \
+       machvec_noop_dma_sync_sg_for_cpu
+#define platform_dma_sync_single_for_device    \
+       machvec_noop_dma_sync_single_for_device
+#define platform_dma_sync_sg_for_device        
machvec_noop_dma_sync_sg_for_device
+#define platform_dma_mapping_error     machvec_noop_dma_mapping_error
+#define platform_dma_supported         machvec_noop_dma_supported
 #else
 #define platform_dma_alloc_coherent    sn_dma_alloc_coherent
 #define platform_dma_free_coherent     sn_dma_free_coherent

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Machvec warning fixes, Xen patchbot-unstable <=