Re: [PATCH 13/22] nds32: use generic dma_noncoherent_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greentime,

thanks for testing the patch!

It looks like nds32 doesn't have a buildbot yet, so this code didn't
even get syntax checkin, sorry.

Below is the incremental fixes based on this thread.

Can you check if my tree works if you just revert the
"nds32: use generic dma_noncoherent_ops" commit?

diff --git a/arch/nds32/kernel/dma.c b/arch/nds32/kernel/dma.c
index 688f1a03dee6..48018275e7f4 100644
--- a/arch/nds32/kernel/dma.c
+++ b/arch/nds32/kernel/dma.c
@@ -330,7 +330,7 @@ void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
 	void *addr = kmap_atomic_pfn(PHYS_PFN(paddr));
 	unsigned long start = (unsigned long)addr;
 
-	switch (direction) {
+	switch (dir) {
 	case DMA_FROM_DEVICE:
 		break;
 	case DMA_TO_DEVICE:
@@ -350,12 +350,12 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
 	void *addr = kmap_atomic_pfn(PHYS_PFN(paddr));
 	unsigned long start = (unsigned long)addr;
 
-	switch (direction) {
+	switch (dir) {
 	case DMA_TO_DEVICE:
 		break;
 	case DMA_FROM_DEVICE:
 	case DMA_BIDIRECTIONAL:
-		cpu_dma_inval_range(start, end);
+		cpu_dma_inval_range(start, start + size);
 		break;
 	default:
 		BUG();
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux