aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Arcangeli <[email protected]>2013-04-11 15:36:09 +0200
committerIngo Molnar <[email protected]>2013-04-12 06:39:20 +0200
commit18699739b60cb60230153ff5475b2ba92be185f9 (patch)
tree6ea839de2b474022fb3f3710865c11ef135a83be
parentf76cfa3c2496c462b5bc01bd0c9340c2715b73ca (diff)
x86/mm/cpa/selftest: Fix false positive in CPA self test
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]>
-rw-r--r--arch/x86/mm/pageattr-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index b0086567271c..0e38951e65eb 100644
--- a/arch/x86/mm/pageattr-test.c
+++ b/arch/x86/mm/pageattr-test.c
@@ -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));