diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-02-04 10:48:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-04 10:48:08 -0500 |
commit | 64f351d197d9ae8ad9624998afa8ee18e696ca44 (patch) | |
tree | 62673c9ecb52e390fb1c936cc1ad75a7da706b28 /arch/x86/mm/pageattr-test.c | |
parent | 07cf89c05f2bbafa002401ac4e09ac31678513e4 (diff) |
x86: cpa selftest, skip non present entries
pud and pmd entries in the RAM area might be marked as non present.
Do not try to modify them in the selftest.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pageattr-test.c')
-rw-r--r-- | arch/x86/mm/pageattr-test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index 7573e786d2f2..398f3a578dde 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c | |||
@@ -137,7 +137,8 @@ static __init int exercise_pageattr(void) | |||
137 | 137 | ||
138 | for (k = 0; k < len[i]; k++) { | 138 | for (k = 0; k < len[i]; k++) { |
139 | pte = lookup_address(addr[i] + k*PAGE_SIZE, &level); | 139 | pte = lookup_address(addr[i] + k*PAGE_SIZE, &level); |
140 | if (!pte || pgprot_val(pte_pgprot(*pte)) == 0) { | 140 | if (!pte || pgprot_val(pte_pgprot(*pte)) == 0 || |
141 | !(pte_val(*pte) & _PAGE_PRESENT)) { | ||
141 | addr[i] = 0; | 142 | addr[i] = 0; |
142 | break; | 143 | break; |
143 | } | 144 | } |