ia64/xen-unstable

changeset 13101:8a9b1b72af44

[IA64] Machvec warning fixes

The compiler doesn't like using machvec_noop for everything

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild2.aw
date Thu Dec 14 13:25:49 2006 -0700 (2006-12-14)
parents ba79a17ff715
children 5a68672cee38
files xen/include/asm-ia64/linux-xen/asm/machvec.h xen/include/asm-ia64/linux-xen/asm/machvec_dig.h xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h
line diff
     1.1 --- a/xen/include/asm-ia64/linux-xen/asm/machvec.h	Thu Dec 14 13:23:33 2006 -0700
     1.2 +++ b/xen/include/asm-ia64/linux-xen/asm/machvec.h	Thu Dec 14 13:25:49 2006 -0700
     1.3 @@ -85,6 +85,114 @@ machvec_noop_mm (struct mm_struct *mm)
     1.4  {
     1.5  }
     1.6  
     1.7 +#ifdef XEN
     1.8 +#include <xen/lib.h>
     1.9 +/*
    1.10 + * These should never get called, they just fill out the machine
    1.11 + * vectors and make the compiler happy.
    1.12 + */
    1.13 +static inline void*
    1.14 +machvec_noop_dma_alloc_coherent (struct device *dev, size_t size,
    1.15 +                                 dma_addr_t *addr, int dir)
    1.16 +{
    1.17 +	panic("%s() called", __FUNCTION__);
    1.18 +	return (void *)0;
    1.19 +}
    1.20 +
    1.21 +static inline void
    1.22 +machvec_noop_dma_free_coherent (struct device *dev, size_t size,
    1.23 +                                void *vaddr, dma_addr_t handle)
    1.24 +{
    1.25 +	panic("%s() called", __FUNCTION__);
    1.26 +}
    1.27 +
    1.28 +static inline dma_addr_t
    1.29 +machvec_noop_dma_map_single (struct device *dev, void *addr,
    1.30 +                             size_t size, int dir)
    1.31 +{
    1.32 +	panic("%s() called", __FUNCTION__);
    1.33 +	return (dma_addr_t)0;
    1.34 +}
    1.35 +
    1.36 +static inline void
    1.37 +machvec_noop_dma_unmap_single (struct device *dev, dma_addr_t vaddr,
    1.38 +                               size_t size, int dir)
    1.39 +{
    1.40 +	panic("%s() called", __FUNCTION__);
    1.41 +}
    1.42 +
    1.43 +static inline int
    1.44 +machvec_noop_dma_map_sg (struct device *dev, struct scatterlist *sglist,
    1.45 +                         int nents, int dir)
    1.46 +{
    1.47 +	panic("%s() called", __FUNCTION__);
    1.48 +	return 0;
    1.49 +}
    1.50 +
    1.51 +static inline void
    1.52 +machvec_noop_dma_unmap_sg (struct device *dev, struct scatterlist *sglist,
    1.53 +                           int nents, int dir)
    1.54 +{
    1.55 +	panic("%s() called", __FUNCTION__);
    1.56 +}
    1.57 +
    1.58 +static inline void
    1.59 +machvec_noop_dma_sync_single_for_cpu (struct device *dev, dma_addr_t vaddr,
    1.60 +                                      size_t size, int dir)
    1.61 +{
    1.62 +	panic("%s() called", __FUNCTION__);
    1.63 +}
    1.64 +
    1.65 +#define machvec_noop_dma_sync_single_for_device		\
    1.66 +	machvec_noop_dma_sync_single_for_cpu
    1.67 +
    1.68 +static inline void
    1.69 +machvec_noop_dma_sync_sg_for_cpu (struct device *dev,
    1.70 +                                  struct scatterlist *sglist,
    1.71 +                                  int nents, int dir)
    1.72 +{
    1.73 +	panic("%s() called", __FUNCTION__);
    1.74 +}
    1.75 +
    1.76 +#define machvec_noop_dma_sync_sg_for_device		\
    1.77 +	machvec_noop_dma_sync_sg_for_cpu
    1.78 +
    1.79 +static inline int
    1.80 +machvec_noop_dma_mapping_error (dma_addr_t dma_addr)
    1.81 +{
    1.82 +	panic("%s() called", __FUNCTION__);
    1.83 +	return 1;
    1.84 +}
    1.85 +
    1.86 +static inline int
    1.87 +machvec_noop_dma_supported (struct device *dev, u64 mask)
    1.88 +{
    1.89 +	panic("%s() called", __FUNCTION__);
    1.90 +	return 0;
    1.91 +}
    1.92 +
    1.93 +static inline char*
    1.94 +machvec_noop_pci_get_legacy_mem (struct pci_bus *bus)
    1.95 +{
    1.96 +	panic("%s() called", __FUNCTION__);
    1.97 +	return 0;
    1.98 +}
    1.99 +
   1.100 +static inline int
   1.101 +machvec_noop_pci_legacy_read (struct pci_bus *bus, u16 port, u32 *val, u8 size)
   1.102 +{
   1.103 +	panic("%s() called", __FUNCTION__);
   1.104 +	return 0;
   1.105 +}
   1.106 +
   1.107 +static inline int
   1.108 +machvec_noop_pci_legacy_write (struct pci_bus *bus, u16 port, u32 val, u8 size)
   1.109 +{
   1.110 +	panic("%s() called", __FUNCTION__);
   1.111 +	return 0;
   1.112 +}
   1.113 +#endif
   1.114 +
   1.115  extern void machvec_setup (char **);
   1.116  extern void machvec_timer_interrupt (int, void *, struct pt_regs *);
   1.117  extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);
     2.1 --- a/xen/include/asm-ia64/linux-xen/asm/machvec_dig.h	Thu Dec 14 13:23:33 2006 -0700
     2.2 +++ b/xen/include/asm-ia64/linux-xen/asm/machvec_dig.h	Thu Dec 14 13:25:49 2006 -0700
     2.3 @@ -19,22 +19,26 @@ extern ia64_mv_setup_t hpsim_setup;
     2.4  #define platform_setup				hpsim_setup
     2.5  
     2.6  #define platform_dma_init			machvec_noop
     2.7 -#define platform_dma_alloc_coherent		machvec_noop
     2.8 -#define platform_dma_free_coherent		machvec_noop
     2.9 -#define platform_dma_map_single			machvec_noop
    2.10 -#define platform_dma_unmap_single		machvec_noop
    2.11 -#define platform_dma_map_sg			machvec_noop
    2.12 -#define platform_dma_unmap_sg			machvec_noop
    2.13 -#define platform_dma_sync_single_for_cpu	machvec_noop
    2.14 -#define platform_dma_sync_sg_for_cpu		machvec_noop
    2.15 -#define platform_dma_sync_single_for_device	machvec_noop
    2.16 -#define platform_dma_sync_sg_for_device		machvec_noop
    2.17 -#define platform_dma_mapping_error		machvec_noop
    2.18 -#define platform_dma_supported			machvec_noop
    2.19 +#define platform_dma_alloc_coherent		machvec_noop_dma_alloc_coherent
    2.20 +#define platform_dma_free_coherent		machvec_noop_dma_free_coherent
    2.21 +#define platform_dma_map_single			machvec_noop_dma_map_single
    2.22 +#define platform_dma_unmap_single		machvec_noop_dma_unmap_single
    2.23 +#define platform_dma_map_sg			machvec_noop_dma_map_sg
    2.24 +#define platform_dma_unmap_sg			machvec_noop_dma_unmap_sg
    2.25 +#define platform_dma_sync_single_for_cpu	\
    2.26 +	machvec_noop_dma_sync_single_for_cpu
    2.27 +#define platform_dma_sync_sg_for_cpu		\
    2.28 +	machvec_noop_dma_sync_sg_for_cpu
    2.29 +#define platform_dma_sync_single_for_device	\
    2.30 +	machvec_noop_dma_sync_single_for_device
    2.31 +#define platform_dma_sync_sg_for_device		\
    2.32 +	machvec_noop_dma_sync_sg_for_device
    2.33 +#define platform_dma_mapping_error		machvec_noop_dma_mapping_error
    2.34 +#define platform_dma_supported			machvec_noop_dma_supported
    2.35  
    2.36 -#define platform_pci_get_legacy_mem		machvec_noop
    2.37 -#define platform_pci_legacy_read		machvec_noop
    2.38 -#define platform_pci_legacy_write		machvec_noop
    2.39 +#define platform_pci_get_legacy_mem		machvec_noop_pci_get_legacy_mem
    2.40 +#define platform_pci_legacy_read		machvec_noop_pci_legacy_read
    2.41 +#define platform_pci_legacy_write		machvec_noop_pci_legacy_write
    2.42  #else
    2.43  #define platform_setup		dig_setup
    2.44  #endif
     3.1 --- a/xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h	Thu Dec 14 13:23:33 2006 -0700
     3.2 +++ b/xen/include/asm-ia64/linux-xen/asm/machvec_hpzx1.h	Thu Dec 14 13:25:49 2006 -0700
     3.3 @@ -26,22 +26,26 @@ extern ia64_mv_irq_init_t hpsim_irq_init
     3.4  #define platform_irq_init			hpsim_irq_init
     3.5  
     3.6  #define platform_dma_init			machvec_noop
     3.7 -#define platform_dma_alloc_coherent		machvec_noop
     3.8 -#define platform_dma_free_coherent		machvec_noop
     3.9 -#define platform_dma_map_single			machvec_noop
    3.10 -#define platform_dma_unmap_single		machvec_noop
    3.11 -#define platform_dma_map_sg			machvec_noop
    3.12 -#define platform_dma_unmap_sg			machvec_noop
    3.13 -#define platform_dma_sync_single_for_cpu	machvec_noop
    3.14 -#define platform_dma_sync_sg_for_cpu		machvec_noop
    3.15 -#define platform_dma_sync_single_for_device	machvec_noop
    3.16 -#define platform_dma_sync_sg_for_device		machvec_noop
    3.17 -#define platform_dma_mapping_error		machvec_noop
    3.18 -#define platform_dma_supported			machvec_noop
    3.19 +#define platform_dma_alloc_coherent		machvec_noop_dma_alloc_coherent
    3.20 +#define platform_dma_free_coherent		machvec_noop_dma_free_coherent
    3.21 +#define platform_dma_map_single			machvec_noop_dma_map_single
    3.22 +#define platform_dma_unmap_single		machvec_noop_dma_unmap_single
    3.23 +#define platform_dma_map_sg			machvec_noop_dma_map_sg
    3.24 +#define platform_dma_unmap_sg			machvec_noop_dma_unmap_sg
    3.25 +#define platform_dma_sync_single_for_cpu	\
    3.26 +	machvec_noop_dma_sync_single_for_cpu
    3.27 +#define platform_dma_sync_sg_for_cpu		\
    3.28 +	machvec_noop_dma_sync_sg_for_cpu
    3.29 +#define platform_dma_sync_single_for_device	\
    3.30 +	machvec_noop_dma_sync_single_for_device
    3.31 +#define platform_dma_sync_sg_for_device		\
    3.32 +	machvec_noop_dma_sync_sg_for_device
    3.33 +#define platform_dma_mapping_error		machvec_noop_dma_mapping_error
    3.34 +#define platform_dma_supported			machvec_noop_dma_supported
    3.35  
    3.36 -#define platform_pci_get_legacy_mem		machvec_noop
    3.37 -#define platform_pci_legacy_read		machvec_noop
    3.38 -#define platform_pci_legacy_write		machvec_noop
    3.39 +#define platform_pci_get_legacy_mem		machvec_noop_pci_get_legacy_mem
    3.40 +#define platform_pci_legacy_read		machvec_noop_pci_legacy_read
    3.41 +#define platform_pci_legacy_write		machvec_noop_pci_legacy_write
    3.42  #else
    3.43  #define platform_setup				dig_setup
    3.44  #define platform_dma_init			machvec_noop
     4.1 --- a/xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h	Thu Dec 14 13:23:33 2006 -0700
     4.2 +++ b/xen/include/asm-ia64/linux-xen/asm/machvec_sn2.h	Thu Dec 14 13:25:49 2006 -0700
     4.3 @@ -110,9 +110,9 @@ extern ia64_mv_teardown_msi_irq_t	sn_tea
     4.4  #define platform_readq_relaxed		__sn_readq_relaxed
     4.5  #define platform_local_vector_to_irq	sn_local_vector_to_irq
     4.6  #ifdef XEN
     4.7 -#define platform_pci_get_legacy_mem	machvec_noop
     4.8 -#define platform_pci_legacy_read	machvec_noop
     4.9 -#define platform_pci_legacy_write	machvec_noop
    4.10 +#define platform_pci_get_legacy_mem	machvec_noop_pci_get_legacy_mem
    4.11 +#define platform_pci_legacy_read	machvec_noop_pci_legacy_read
    4.12 +#define platform_pci_legacy_write	machvec_noop_pci_legacy_write
    4.13  #else
    4.14  #define platform_pci_get_legacy_mem	sn_pci_get_legacy_mem
    4.15  #define platform_pci_legacy_read	sn_pci_legacy_read
    4.16 @@ -120,18 +120,21 @@ extern ia64_mv_teardown_msi_irq_t	sn_tea
    4.17  #endif
    4.18  #define platform_dma_init		machvec_noop
    4.19  #ifdef XEN
    4.20 -#define platform_dma_alloc_coherent	machvec_noop
    4.21 -#define platform_dma_free_coherent	machvec_noop
    4.22 -#define platform_dma_map_single		machvec_noop
    4.23 -#define platform_dma_unmap_single	machvec_noop
    4.24 -#define platform_dma_map_sg		machvec_noop
    4.25 -#define platform_dma_unmap_sg		machvec_noop
    4.26 -#define platform_dma_sync_single_for_cpu machvec_noop
    4.27 -#define platform_dma_sync_sg_for_cpu	machvec_noop
    4.28 -#define platform_dma_sync_single_for_device machvec_noop
    4.29 -#define platform_dma_sync_sg_for_device	machvec_noop
    4.30 -#define platform_dma_mapping_error	machvec_noop
    4.31 -#define platform_dma_supported		machvec_noop
    4.32 +#define platform_dma_alloc_coherent	machvec_noop_dma_alloc_coherent
    4.33 +#define platform_dma_free_coherent	machvec_noop_dma_free_coherent
    4.34 +#define platform_dma_map_single		machvec_noop_dma_map_single
    4.35 +#define platform_dma_unmap_single	machvec_noop_dma_unmap_single
    4.36 +#define platform_dma_map_sg		machvec_noop_dma_map_sg
    4.37 +#define platform_dma_unmap_sg		machvec_noop_dma_unmap_sg
    4.38 +#define platform_dma_sync_single_for_cpu	\
    4.39 +	machvec_noop_dma_sync_single_for_cpu
    4.40 +#define platform_dma_sync_sg_for_cpu		\
    4.41 +	machvec_noop_dma_sync_sg_for_cpu
    4.42 +#define platform_dma_sync_single_for_device	\
    4.43 +	machvec_noop_dma_sync_single_for_device
    4.44 +#define platform_dma_sync_sg_for_device	machvec_noop_dma_sync_sg_for_device
    4.45 +#define platform_dma_mapping_error	machvec_noop_dma_mapping_error
    4.46 +#define platform_dma_supported		machvec_noop_dma_supported
    4.47  #else
    4.48  #define platform_dma_alloc_coherent	sn_dma_alloc_coherent
    4.49  #define platform_dma_free_coherent	sn_dma_free_coherent