From: David Miller Date: Tue, 20 Jun 2006 07:44:27 +0000 (-0700) Subject: [PATCH] SPARC32: Fix iommu_flush_iotlb end address X-Git-Tag: v2.6.17.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50cdbb604d8e4f38c30e387ef28433a02b91e6f1;p=thirdparty%2Fkernel%2Fstable.git [PATCH] SPARC32: 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 Signed-off-by: Chris Wright --- diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 77840c8047866..7215849db392e 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);