Skip to content
Commit 75e6bf96 authored by David Woodhouse's avatar David Woodhouse
Browse files

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: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 7766a3fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment