x86: make mm/gup.c more virtualization friendly

Since pte_flags() is much cheaper than pte_val() in some virtualized
environments (namely, Xen), use the former whereever possible.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: "Nick Piggin" <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Jan Beulich 2008-09-17 16:48:17 +01:00 • committed by Ingo Molnar
commit 606ee44dbb
2 changed files with 6 additions and 6 deletions

View file

@ -206,7 +206,7 @@ static inline int pte_exec(pte_t pte)
static inline int pte_special(pte_t pte)
{
return pte_val(pte) & _PAGE_SPECIAL;
return pte_flags(pte) & _PAGE_SPECIAL;
}
static inline unsigned long pte_pfn(pte_t pte)