From: Zhao, Yu Date: Fri, 13 Feb 2009 09:55:49 +0000 (+0800) Subject: intel-iommu: Fix address wrap on 32-bit kernel. X-Git-Tag: v2.6.30-rc1~228^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afeeb7cebbd223ffee303fd8de4ba97458b13581;p=pandora-kernel.git intel-iommu: Fix address wrap on 32-bit kernel. The problem is in dma_pte_clear_range and dma_pte_free_pagetable. When intel_unmap_single and intel_unmap_sg call them, the end address may be zero if the 'start_addr + size' rounds up. So no PTE gets cleared. The uncleared PTE fires the BUG_ON when it's used again to create new mappings. After I modified dma_pte_clear_range a bit, the BUG_ON is gone. Tested both 32 and 32 PAE modes on Intel X58 and Q35 platforms. Signed-off-by: Yu Zhao Signed-off-by: David Woodhouse --- Reading git-diff-tree failed