aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2006-06-20 00:44:27 -0700
committerChris Wright <chrisw@sous-sol.org>2006-06-29 17:17:15 -0700
commit50cdbb604d8e4f38c30e387ef28433a02b91e6f1 (patch)
tree4899008346e004d1955293f594b59cbfb5b11097
parent94f37cf0a304c16dcf86ec542e88b5448b2edfb7 (diff)
[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 <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r--arch/sparc/mm/iommu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 77840c80478..7215849db39 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);