Skip to content

Commit c819f37

Browse files
Mel Gormantorvalds
Mel Gorman
authored andcommitted
x86: mm: restore original pte_special check
Commit b38af47 ("x86,mm: fix pte_special versus pte_numa") adjusted the pte_special check to take into account that a special pte had SPECIAL and neither PRESENT nor PROTNONE. Now that NUMA hinting PTEs are no longer modifying _PAGE_PRESENT it should be safe to restore the original pte_special behaviour. Signed-off-by: Mel Gorman <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Dave Jones <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Kirill Shutemov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Sasha Levin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent e944fd6 commit c819f37

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/x86/include/asm/pgtable.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,7 @@ static inline int pte_exec(pte_t pte)
132132

133133
static inline int pte_special(pte_t pte)
134134
{
135-
/*
136-
* See CONFIG_NUMA_BALANCING pte_numa in include/asm-generic/pgtable.h.
137-
* On x86 we have _PAGE_BIT_NUMA == _PAGE_BIT_GLOBAL+1 ==
138-
* __PAGE_BIT_SOFTW1 == _PAGE_BIT_SPECIAL.
139-
*/
140-
return (pte_flags(pte) & _PAGE_SPECIAL) &&
141-
(pte_flags(pte) & (_PAGE_PRESENT|_PAGE_PROTNONE));
135+
return pte_flags(pte) & _PAGE_SPECIAL;
142136
}
143137

144138
static inline unsigned long pte_pfn(pte_t pte)

0 commit comments

Comments
 (0)