Skip to content

Commit

Permalink
x86/mm/cpa/selftest: Fix false positive in CPA self test
Browse files Browse the repository at this point in the history
If the pmd is not present, _PAGE_PSE will not be set anymore.
Fix the false positive.

Reported-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrea Arcangeli <[email protected]>
Cc: Stefan Bader <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Borislav Petkov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
aagit authored and Ingo Molnar committed Apr 12, 2013
1 parent f76cfa3 commit 1869973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/pageattr-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int print_split(struct split_state *s)
s->gpg++;
i += GPS/PAGE_SIZE;
} else if (level == PG_LEVEL_2M) {
if (!(pte_val(*pte) & _PAGE_PSE)) {
if ((pte_val(*pte) & _PAGE_PRESENT) && !(pte_val(*pte) & _PAGE_PSE)) {
printk(KERN_ERR
"%lx level %d but not PSE %Lx\n",
addr, level, (u64)pte_val(*pte));
Expand Down

0 comments on commit 1869973

Please sign in to comment.