From: David Woodhouse Date: Thu, 2 Jul 2009 10:21:16 +0000 (+0100) Subject: intel-iommu: Introduce first_pte_in_page() to simplify PTE-setting loops X-Git-Tag: v2.6.31-rc2~12^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75e6bf9638992dfc0fec9c3ca10444c8e0d6a638;p=pandora-kernel.git intel-iommu: Introduce first_pte_in_page() to simplify PTE-setting loops On Wed, 2009-07-01 at 16:59 -0700, Linus Torvalds wrote: > I also _really_ hate how you do > > (unsigned long)pte >> VTD_PAGE_SHIFT == > (unsigned long)first_pte >> VTD_PAGE_SHIFT Kill this, in favour of just looking to see if the incremented pte pointer has 'wrapped' onto the next page. Which means we have to check it _after_ incrementing it, not before. Signed-off-by: David Woodhouse --- Reading git-diff-tree failed