Commit 2b27a196 authored by Andrew Morton's avatar Andrew Morton Committed by David Mosberger

[PATCH] ia64: add dma_mapping_error() support

parent 723ec813
...@@ -1979,6 +1979,12 @@ sba_dma_supported (struct device *dev, u64 mask) ...@@ -1979,6 +1979,12 @@ sba_dma_supported (struct device *dev, u64 mask)
return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL); return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL);
} }
int
sba_dma_mapping_error (dma_addr_t dma_addr)
{
return 0;
}
__setup("nosbagart", nosbagart); __setup("nosbagart", nosbagart);
static int __init static int __init
...@@ -2004,6 +2010,7 @@ sba_page_override(char *str) ...@@ -2004,6 +2010,7 @@ sba_page_override(char *str)
__setup("sbapagesize=",sba_page_override); __setup("sbapagesize=",sba_page_override);
EXPORT_SYMBOL(sba_dma_mapping_error);
EXPORT_SYMBOL(sba_map_single); EXPORT_SYMBOL(sba_map_single);
EXPORT_SYMBOL(sba_unmap_single); EXPORT_SYMBOL(sba_unmap_single);
EXPORT_SYMBOL(sba_map_sg); EXPORT_SYMBOL(sba_map_sg);
......
...@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct device *hwdev, struct scatterlist *sg, int ne ...@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct device *hwdev, struct scatterlist *sg, int ne
sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir); sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
} }
int
swiotlb_dma_mapping_error (dma_addr_t dma_addr)
{
return 0;
}
/* /*
* Return whether the given PCI device DMA address mask can be supported properly. For * Return whether the given PCI device DMA address mask can be supported properly. For
* example, if your device can only drive the low 24-bits during PCI bus mastering, then * example, if your device can only drive the low 24-bits during PCI bus mastering, then
...@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cpu); ...@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cpu);
EXPORT_SYMBOL(swiotlb_sync_single_for_device); EXPORT_SYMBOL(swiotlb_sync_single_for_device);
EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu); EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
EXPORT_SYMBOL(swiotlb_sync_sg_for_device); EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
EXPORT_SYMBOL(swiotlb_dma_mapping_error);
EXPORT_SYMBOL(swiotlb_alloc_coherent); EXPORT_SYMBOL(swiotlb_alloc_coherent);
EXPORT_SYMBOL(swiotlb_free_coherent); EXPORT_SYMBOL(swiotlb_free_coherent);
EXPORT_SYMBOL(swiotlb_dma_supported); EXPORT_SYMBOL(swiotlb_dma_supported);
...@@ -652,6 +652,13 @@ sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems ...@@ -652,6 +652,13 @@ sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems
} }
EXPORT_SYMBOL(sn_dma_sync_sg_for_device); EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
int
sn_dma_mapping_error(dma_addr_t dma_addr)
{
return 0;
}
EXPORT_SYMBOL(sn_dma_mapping_error);
EXPORT_SYMBOL(sn_pci_unmap_single); EXPORT_SYMBOL(sn_pci_unmap_single);
EXPORT_SYMBOL(sn_pci_map_single); EXPORT_SYMBOL(sn_pci_map_single);
EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu); EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu);
......
...@@ -42,6 +42,7 @@ typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_ ...@@ -42,6 +42,7 @@ typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_
typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int); typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int); typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int); typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
typedef int ia64_mv_dma_mapping_error (dma_addr_t dma_addr);
typedef int ia64_mv_dma_supported (struct device *, u64); typedef int ia64_mv_dma_supported (struct device *, u64);
/* /*
...@@ -105,6 +106,7 @@ extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int ...@@ -105,6 +106,7 @@ extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int
# define platform_dma_sync_sg_for_cpu ia64_mv.dma_sync_sg_for_cpu # define platform_dma_sync_sg_for_cpu ia64_mv.dma_sync_sg_for_cpu
# define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device # define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
# define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device # define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
# define platform_dma_mapping_error ia64_mv.dma_mapping_error
# define platform_dma_supported ia64_mv.dma_supported # define platform_dma_supported ia64_mv.dma_supported
# define platform_irq_desc ia64_mv.irq_desc # define platform_irq_desc ia64_mv.irq_desc
# define platform_irq_to_vector ia64_mv.irq_to_vector # define platform_irq_to_vector ia64_mv.irq_to_vector
...@@ -149,6 +151,7 @@ struct ia64_machine_vector { ...@@ -149,6 +151,7 @@ struct ia64_machine_vector {
ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu; ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device; ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
ia64_mv_dma_mapping_error *dma_mapping_error;
ia64_mv_dma_supported *dma_supported; ia64_mv_dma_supported *dma_supported;
ia64_mv_irq_desc *irq_desc; ia64_mv_irq_desc *irq_desc;
ia64_mv_irq_to_vector *irq_to_vector; ia64_mv_irq_to_vector *irq_to_vector;
...@@ -189,6 +192,7 @@ struct ia64_machine_vector { ...@@ -189,6 +192,7 @@ struct ia64_machine_vector {
platform_dma_sync_sg_for_cpu, \ platform_dma_sync_sg_for_cpu, \
platform_dma_sync_single_for_device, \ platform_dma_sync_single_for_device, \
platform_dma_sync_sg_for_device, \ platform_dma_sync_sg_for_device, \
platform_dma_mapping_error, \
platform_dma_supported, \ platform_dma_supported, \
platform_irq_desc, \ platform_irq_desc, \
platform_irq_to_vector, \ platform_irq_to_vector, \
...@@ -230,6 +234,7 @@ extern ia64_mv_dma_sync_single_for_cpu swiotlb_sync_single_for_cpu; ...@@ -230,6 +234,7 @@ extern ia64_mv_dma_sync_single_for_cpu swiotlb_sync_single_for_cpu;
extern ia64_mv_dma_sync_sg_for_cpu swiotlb_sync_sg_for_cpu; extern ia64_mv_dma_sync_sg_for_cpu swiotlb_sync_sg_for_cpu;
extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device; extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device;
extern ia64_mv_dma_sync_sg_for_device swiotlb_sync_sg_for_device; extern ia64_mv_dma_sync_sg_for_device swiotlb_sync_sg_for_device;
extern ia64_mv_dma_mapping_error swiotlb_dma_mapping_error;
extern ia64_mv_dma_supported swiotlb_dma_supported; extern ia64_mv_dma_supported swiotlb_dma_supported;
/* /*
...@@ -288,6 +293,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; ...@@ -288,6 +293,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported;
#ifndef platform_dma_sync_sg_for_device #ifndef platform_dma_sync_sg_for_device
# define platform_dma_sync_sg_for_device swiotlb_sync_sg_for_device # define platform_dma_sync_sg_for_device swiotlb_sync_sg_for_device
#endif #endif
#ifndef platform_dma_mapping_error
# define platform_dma_mapping_error swiotlb_dma_mapping_error
#endif
#ifndef platform_dma_supported #ifndef platform_dma_supported
# define platform_dma_supported swiotlb_dma_supported # define platform_dma_supported swiotlb_dma_supported
#endif #endif
......
...@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu sn_dma_sync_single_for_cpu; ...@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu sn_dma_sync_single_for_cpu;
extern ia64_mv_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu; extern ia64_mv_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu;
extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device; extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device;
extern ia64_mv_dma_mapping_error sn_dma_mapping_error;
extern ia64_mv_dma_supported sn_dma_supported; extern ia64_mv_dma_supported sn_dma_supported;
/* /*
...@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported sn_dma_supported; ...@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported sn_dma_supported;
#define platform_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu #define platform_dma_sync_sg_for_cpu sn_dma_sync_sg_for_cpu
#define platform_dma_sync_single_for_device sn_dma_sync_single_for_device #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
#define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device #define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device
#define platform_dma_mapping_error sn_dma_mapping_error
#define platform_dma_supported sn_dma_supported #define platform_dma_supported sn_dma_supported
#include <asm/sn/sn2/io.h> #include <asm/sn/sn2/io.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment