]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ppc32: Fix PCI DMA API changes
authorAndrew Morton <akpm@osdl.org>
Tue, 16 Mar 2004 23:07:10 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 16 Mar 2004 23:07:10 +0000 (15:07 -0800)
From: Tom Rini <trini@kernel.crashing.org>

When Dave Miller updated <asm-ppc/pci.h> for the _for_device and _for_cpu
portions of the PCI DMA API, he assumed that on PPC32 consistent_sync*
would also need to be changed for device or cpu.  This is not the case, so
what this does is the pci_*_for_{cpu,device} calls call
consistent_sync{,page} again.

include/asm-ppc/pci.h

index eef687474e464fbf88155af43d6ec006ba8f5d2c..43e4680a72cde76891e9a3361776f9a5c80d7c9a 100644 (file)
@@ -200,7 +200,7 @@ static inline void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev,
 {
        BUG_ON(direction == PCI_DMA_NONE);
 
-       consistent_sync_for_cpu(bus_to_virt(dma_handle), size, direction);
+       consistent_sync(bus_to_virt(dma_handle), size, direction);
 }
 
 static inline void pci_dma_sync_single_for_device(struct pci_dev *hwdev,
@@ -209,7 +209,7 @@ static inline void pci_dma_sync_single_for_device(struct pci_dev *hwdev,
 {
        BUG_ON(direction == PCI_DMA_NONE);
 
-       consistent_sync_for_device(bus_to_virt(dma_handle), size, direction);
+       consistent_sync(bus_to_virt(dma_handle), size, direction);
 }
 
 /* Make physical memory consistent for a set of streaming
@@ -227,8 +227,8 @@ static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev,
        BUG_ON(direction == PCI_DMA_NONE);
 
        for (i = 0; i < nelems; i++, sg++)
-               consistent_sync_page_for_cpu(sg->page, sg->offset,
-                                            sg->length, direction);
+               consistent_sync_page(sg->page, sg->offset,
+                                    sg->length, direction);
 }
 
 static inline void pci_dma_sync_sg_for_device(struct pci_dev *hwdev,
@@ -240,8 +240,8 @@ static inline void pci_dma_sync_sg_for_device(struct pci_dev *hwdev,
        BUG_ON(direction == PCI_DMA_NONE);
 
        for (i = 0; i < nelems; i++, sg++)
-               consistent_sync_page_for_device(sg->page, sg->offset,
-                                               sg->length, direction);
+               consistent_sync_page(sg->page, sg->offset,
+                                    sg->length, direction);
 }
 
 /* Return whether the given PCI device DMA address mask can