diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/dma.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/dma.h | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/ioport.c | 7 |
3 files changed, 10 insertions, 8 deletions
diff --git a/arch/sparc/kernel/dma.c b/arch/sparc/kernel/dma.c index 15820a918171..a5d50dac735c 100644 --- a/arch/sparc/kernel/dma.c +++ b/arch/sparc/kernel/dma.c | |||
@@ -68,8 +68,7 @@ static dma_addr_t dma32_map_page(struct device *dev, struct page *page, | |||
68 | return pci_map_page(to_pci_dev(dev), page, offset, | 68 | return pci_map_page(to_pci_dev(dev), page, offset, |
69 | size, (int)direction); | 69 | size, (int)direction); |
70 | #endif | 70 | #endif |
71 | return sbus_map_single(dev, page_address(page) + offset, | 71 | return sbus_map_page(dev, page, offset, size, (int)direction); |
72 | size, (int)direction); | ||
73 | } | 72 | } |
74 | 73 | ||
75 | static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, | 74 | static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, |
@@ -83,7 +82,7 @@ static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, | |||
83 | return; | 82 | return; |
84 | } | 83 | } |
85 | #endif | 84 | #endif |
86 | sbus_unmap_single(dev, dma_address, size, (int)direction); | 85 | sbus_unmap_page(dev, dma_address, size, (int)direction); |
87 | } | 86 | } |
88 | 87 | ||
89 | static int dma32_map_sg(struct device *dev, struct scatterlist *sg, | 88 | static int dma32_map_sg(struct device *dev, struct scatterlist *sg, |
diff --git a/arch/sparc/kernel/dma.h b/arch/sparc/kernel/dma.h index f8d8951adb53..680351ee0d40 100644 --- a/arch/sparc/kernel/dma.h +++ b/arch/sparc/kernel/dma.h | |||
@@ -1,8 +1,8 @@ | |||
1 | void *sbus_alloc_consistent(struct device *dev, long len, u32 *dma_addrp); | 1 | void *sbus_alloc_consistent(struct device *dev, long len, u32 *dma_addrp); |
2 | void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba); | 2 | void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba); |
3 | dma_addr_t sbus_map_single(struct device *dev, void *va, | 3 | dma_addr_t sbus_map_page(struct device *dev, struct page *page, |
4 | size_t len, int direction); | 4 | unsigned long offset, size_t len, int direction); |
5 | void sbus_unmap_single(struct device *dev, dma_addr_t ba, | 5 | void sbus_unmap_page(struct device *dev, dma_addr_t ba, |
6 | size_t n, int direction); | 6 | size_t n, int direction); |
7 | int sbus_map_sg(struct device *dev, struct scatterlist *sg, | 7 | int sbus_map_sg(struct device *dev, struct scatterlist *sg, |
8 | int n, int direction); | 8 | int n, int direction); |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 87ea0d03d975..39ff1e0c5183 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -337,8 +337,11 @@ void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba) | |||
337 | * CPU view of this memory may be inconsistent with | 337 | * CPU view of this memory may be inconsistent with |
338 | * a device view and explicit flushing is necessary. | 338 | * a device view and explicit flushing is necessary. |
339 | */ | 339 | */ |
340 | dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int direction) | 340 | dma_addr_t sbus_map_page(struct device *dev, struct page *page, |
341 | unsigned long offset, size_t len, int direction) | ||
341 | { | 342 | { |
343 | void *va = page_address(page) + offset; | ||
344 | |||
342 | /* XXX why are some lengths signed, others unsigned? */ | 345 | /* XXX why are some lengths signed, others unsigned? */ |
343 | if (len <= 0) { | 346 | if (len <= 0) { |
344 | return 0; | 347 | return 0; |
@@ -350,7 +353,7 @@ dma_addr_t sbus_map_single(struct device *dev, void *va, size_t len, int directi | |||
350 | return mmu_get_scsi_one(dev, va, len); | 353 | return mmu_get_scsi_one(dev, va, len); |
351 | } | 354 | } |
352 | 355 | ||
353 | void sbus_unmap_single(struct device *dev, dma_addr_t ba, size_t n, int direction) | 356 | void sbus_unmap_page(struct device *dev, dma_addr_t ba, size_t n, int direction) |
354 | { | 357 | { |
355 | mmu_release_scsi_one(dev, ba, n); | 358 | mmu_release_scsi_one(dev, ba, n); |
356 | } | 359 | } |