summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2013-04-11 15:36:09 +0200
committerIngo Molnar <mingo@kernel.org>2013-04-12 06:39:20 +0200
commit18699739b60cb60230153ff5475b2ba92be185f9 (patch)
tree6ea839de2b474022fb3f3710865c11ef135a83be /arch
parentf76cfa3c2496c462b5bc01bd0c9340c2715b73ca (diff)
downloadlinux-3.10-18699739b60cb60230153ff5475b2ba92be185f9.tar.gz
linux-3.10-18699739b60cb60230153ff5475b2ba92be185f9.tar.bz2
linux-3.10-18699739b60cb60230153ff5475b2ba92be185f9.zip
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 <mingo@kernel.org> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: Stefan Bader <stefan.bader@canonical.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Borislav Petkov <bp@alien8.de> Link: http://lkml.kernel.org/r/1365687369-30802-1-git-send-email-aarcange@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-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 b0086567271..0e38951e65e 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));