]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] SPARC32: Fix iommu_flush_iotlb end address
authorDavid Miller <davem@davemloft.net>
Tue, 20 Jun 2006 07:44:27 +0000 (00:44 -0700)
committerChris Wright <chrisw@sous-sol.org>
Fri, 30 Jun 2006 00:17:15 +0000 (17:17 -0700)
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>
arch/sparc/mm/iommu.c

index 77840c80478665058b778939b3219861d9744e5e..7215849db392e507552ed2c4a499e7c78ef8809b 100644 (file)
@@ -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);