Commit ddcc6311 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc32: Fix PCI DMA API changes

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.
parent 10e50a68
...@@ -200,7 +200,7 @@ static inline void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, ...@@ -200,7 +200,7 @@ static inline void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev,
{ {
BUG_ON(direction == PCI_DMA_NONE); 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, 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, ...@@ -209,7 +209,7 @@ static inline void pci_dma_sync_single_for_device(struct pci_dev *hwdev,
{ {
BUG_ON(direction == PCI_DMA_NONE); 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 /* 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, ...@@ -227,8 +227,8 @@ static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev,
BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE);
for (i = 0; i < nelems; i++, sg++) for (i = 0; i < nelems; i++, sg++)
consistent_sync_page_for_cpu(sg->page, sg->offset, consistent_sync_page(sg->page, sg->offset,
sg->length, direction); sg->length, direction);
} }
static inline void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, 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, ...@@ -240,8 +240,8 @@ static inline void pci_dma_sync_sg_for_device(struct pci_dev *hwdev,
BUG_ON(direction == PCI_DMA_NONE); BUG_ON(direction == PCI_DMA_NONE);
for (i = 0; i < nelems; i++, sg++) for (i = 0; i < nelems; i++, sg++)
consistent_sync_page_for_device(sg->page, sg->offset, consistent_sync_page(sg->page, sg->offset,
sg->length, direction); sg->length, direction);
} }
/* Return whether the given PCI device DMA address mask can /* Return whether the given PCI device DMA address mask can
......
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