public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpa: pageattr-test: fix false positive in CPA self test
@ 2013-04-11 13:36 Andrea Arcangeli
  2013-04-14 16:06 ` [tip:x86/urgent] x86/mm/cpa/selftest: Fix " tip-bot for Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Arcangeli @ 2013-04-11 13:36 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andrew Morton, Stefan Bader, Andy Whitcroft,
	Mel Gorman, Borislav Petkov

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>
---
 arch/x86/mm/pageattr-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index b008656..0e38951 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));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/urgent] x86/mm/cpa/selftest: Fix false positive in CPA self test
  2013-04-11 13:36 [PATCH] cpa: pageattr-test: fix false positive in CPA self test Andrea Arcangeli
@ 2013-04-14 16:06 ` tip-bot for Andrea Arcangeli
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Andrea Arcangeli @ 2013-04-14 16:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, apw, bp, stefan.bader, aarcange,
	mgorman, tglx

Commit-ID:  18699739b60cb60230153ff5475b2ba92be185f9
Gitweb:     http://git.kernel.org/tip/18699739b60cb60230153ff5475b2ba92be185f9
Author:     Andrea Arcangeli <aarcange@redhat.com>
AuthorDate: Thu, 11 Apr 2013 15:36:09 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 12 Apr 2013 06:39:20 +0200

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>
---
 arch/x86/mm/pageattr-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index b008656..0e38951 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));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-14 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-11 13:36 [PATCH] cpa: pageattr-test: fix false positive in CPA self test Andrea Arcangeli
2013-04-14 16:06 ` [tip:x86/urgent] x86/mm/cpa/selftest: Fix " tip-bot for Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox