diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-28 12:01:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-28 12:01:42 -0500 |
commit | c4568d6c7ec7557fbe8656286aea29f67388f7d4 (patch) | |
tree | 783873ec85ca67f2de69986645b1b007231f8f6d /arch/powerpc/kernel/vio.c | |
parent | 78a768b6ca40e104442ade090226ed4ee0e6cebf (diff) | |
parent | 4c456a67f501b8b15542c7c21c28812bf88f484b (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
powerpc/pseries: Correct VIO bus accounting problem in CMO env.
powerpc: More printing warning fixes for the l64 to ll64 conversion
powerpc: Remove arch/ppc cruft from Kconfig
powerpc: Printing fix for l64 to ll64 conversion: phyp_dump.c
powerpc/embedded6xx: Update defconfigs
powerpc/8xx: Update defconfigs
powerpc/86xx: Update defconfigs
powerpc/83xx: Update defconfigs
powerpc/85xx: Update defconfigs
powerpc/mpc8313erdb: fix kernel panic because mdio device is not probed
powerpc/4xx: Update multi-board PowerPC 4xx defconfigs
powerpc/44x: Update PowerPC 44x defconfigs
powerpc/40x: Update PowerPC 40x defconfigs
powerpc/85xx: Fix typo in mpc8572ds dts
powerpc/44x: Warp patches for the new NDFC driver
powerpc/4xx: DTS: Add Add'l SDRAM0 Compatible and Interrupt Info
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 94aa7b011b27..d3694498f3af 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -492,14 +492,14 @@ static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size, | |||
492 | struct vio_dev *viodev = to_vio_dev(dev); | 492 | struct vio_dev *viodev = to_vio_dev(dev); |
493 | void *ret; | 493 | void *ret; |
494 | 494 | ||
495 | if (vio_cmo_alloc(viodev, roundup(size, IOMMU_PAGE_SIZE))) { | 495 | if (vio_cmo_alloc(viodev, roundup(size, PAGE_SIZE))) { |
496 | atomic_inc(&viodev->cmo.allocs_failed); | 496 | atomic_inc(&viodev->cmo.allocs_failed); |
497 | return NULL; | 497 | return NULL; |
498 | } | 498 | } |
499 | 499 | ||
500 | ret = dma_iommu_ops.alloc_coherent(dev, size, dma_handle, flag); | 500 | ret = dma_iommu_ops.alloc_coherent(dev, size, dma_handle, flag); |
501 | if (unlikely(ret == NULL)) { | 501 | if (unlikely(ret == NULL)) { |
502 | vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE)); | 502 | vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE)); |
503 | atomic_inc(&viodev->cmo.allocs_failed); | 503 | atomic_inc(&viodev->cmo.allocs_failed); |
504 | } | 504 | } |
505 | 505 | ||
@@ -513,7 +513,7 @@ static void vio_dma_iommu_free_coherent(struct device *dev, size_t size, | |||
513 | 513 | ||
514 | dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle); | 514 | dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle); |
515 | 515 | ||
516 | vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE)); | 516 | vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE)); |
517 | } | 517 | } |
518 | 518 | ||
519 | static dma_addr_t vio_dma_iommu_map_page(struct device *dev, struct page *page, | 519 | static dma_addr_t vio_dma_iommu_map_page(struct device *dev, struct page *page, |
@@ -572,6 +572,7 @@ static int vio_dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist, | |||
572 | if (unlikely(!ret)) { | 572 | if (unlikely(!ret)) { |
573 | vio_cmo_dealloc(viodev, alloc_size); | 573 | vio_cmo_dealloc(viodev, alloc_size); |
574 | atomic_inc(&viodev->cmo.allocs_failed); | 574 | atomic_inc(&viodev->cmo.allocs_failed); |
575 | return ret; | ||
575 | } | 576 | } |
576 | 577 | ||
577 | for (sgl = sglist, count = 0; count < ret; count++, sgl++) | 578 | for (sgl = sglist, count = 0; count < ret; count++, sgl++) |