diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-02 11:21:16 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-07-02 11:27:13 +0100 |
commit | 75e6bf9638992dfc0fec9c3ca10444c8e0d6a638 (patch) | |
tree | bdbabd91d77edb3d623292ea97b17d88d053816e /lib/iommu-helper.c | |
parent | 7766a3fb905f0b078b05f5d6a6be8df4c64b9f51 (diff) |
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 <David.Woodhouse@intel.com>
Diffstat (limited to 'lib/iommu-helper.c')
0 files changed, 0 insertions, 0 deletions