diff options
author | David Miller <davem@davemloft.net> | 2008-01-11 01:27:23 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-08 12:01:27 -0800 |
commit | 7a40387d552af1cdc265827e94528149a0725b0d (patch) | |
tree | 592afcfd342905af9ae480cd452cc85fa2d4fbbf | |
parent | b525b62619750d38b4135d39f82ae89ff89ef935 (diff) | |
download | linux-stable-7a40387d552af1cdc265827e94528149a0725b0d.tar.gz linux-stable-7a40387d552af1cdc265827e94528149a0725b0d.tar.bz2 linux-stable-7a40387d552af1cdc265827e94528149a0725b0d.zip |
SPARC64: Fix OOPS in dma_sync_*_for_device()
[SPARC64]: Fix OOPS in dma_sync_*_for_device()
[ Upstream commit: 36bb61346d9e64b55285f27363e93a6e96f2abba ]
I included these operations vector cases for situations
where we never need to do anything, the entries aren't
filled in by any implementation, so we OOPS trying to
invoke NULL pointer functions.
Really make them NOPs, to fix the bug.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/asm-sparc64/dma-mapping.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 1fc655452b81..38cbec76a33f 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h @@ -25,15 +25,9 @@ struct dma_ops { void (*sync_single_for_cpu)(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction); - void (*sync_single_for_device)(struct device *dev, - dma_addr_t dma_handle, size_t size, - enum dma_data_direction direction); void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction direction); - void (*sync_sg_for_device)(struct device *dev, struct scatterlist *sg, - int nelems, - enum dma_data_direction direction); }; extern const struct dma_ops *dma_ops; @@ -105,7 +99,7 @@ static inline void dma_sync_single_for_device(struct device *dev, size_t size, enum dma_data_direction direction) { - dma_ops->sync_single_for_device(dev, dma_handle, size, direction); + /* No flushing needed to sync cpu writes to the device. */ } static inline void dma_sync_single_range_for_cpu(struct device *dev, @@ -123,7 +117,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev, size_t size, enum dma_data_direction direction) { - dma_sync_single_for_device(dev, dma_handle+offset, size, direction); + /* No flushing needed to sync cpu writes to the device. */ } @@ -138,7 +132,7 @@ static inline void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction direction) { - dma_ops->sync_sg_for_device(dev, sg, nelems, direction); + /* No flushing needed to sync cpu writes to the device. */ } static inline int dma_mapping_error(dma_addr_t dma_addr) |