From: Bob Breuer Date: Tue, 20 Jun 2006 07:36:56 +0000 (-0700) Subject: [SPARC]: Fix iommu_flush_iotlb end address X-Git-Tag: v3.12-rc1~35875^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3185d4d2873a46ca1620d784013f285522091aa0;p=kernel%2Fkernel-generic.git [SPARC]: Fix iommu_flush_iotlb end address Fix the calculation of the end address when flushing iotlb entries to ram. This bug has been a cause of esp dma errors, and it affects HyperSPARC systems much worse than SuperSPARC systems. Signed-off-by: Bob Breuer Signed-off-by: David S. Miller --- diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 77840c8..7215849 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -144,8 +144,9 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte) unsigned long start; unsigned long end; - start = (unsigned long)iopte & PAGE_MASK; + start = (unsigned long)iopte; end = PAGE_ALIGN(start + niopte*sizeof(iopte_t)); + start &= PAGE_MASK; if (viking_mxcc_present) { while(start < end) { viking_mxcc_flush_page(start);