diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:34:09 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:34:09 +0100 |
commit | 86f03989d99cfa2e1216cdd7aa996852236909cf (patch) | |
tree | 6fae63f51c4adf08f94975b48e656b31c6bced62 /arch/x86/mm/pageattr-test.c | |
parent | aba8391f7323294e88e3a665513434aba4042a7d (diff) |
x86: cpa: fix the self-test
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/pageattr-test.c')
-rw-r--r-- | arch/x86/mm/pageattr-test.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index 554820265b9..06353d43f72 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c @@ -15,8 +15,7 @@ #include <asm/kdebug.h> enum { - NTEST = 400, - LOWEST_LEVEL = PG_LEVEL_4K, + NTEST = 4000, #ifdef CONFIG_X86_64 LPS = (1 << PMD_SHIFT), #elif defined(CONFIG_X86_PAE) @@ -59,10 +58,10 @@ static __init int print_split(struct split_state *s) continue; } - if (level == 2 && sizeof(long) == 8) { + if (level == PG_LEVEL_1G && sizeof(long) == 8) { s->gpg++; i += GPS/PAGE_SIZE; - } else if (level != LOWEST_LEVEL) { + } else if (level == PG_LEVEL_2M) { if (!(pte_val(*pte) & _PAGE_PSE)) { printk(KERN_ERR "%lx level %d but not PSE %Lx\n", @@ -162,7 +161,7 @@ static __init int exercise_pageattr(void) continue; } - err = __change_page_attr_clear(addr[i], len[i], + err = change_page_attr_clear(addr[i], len[i], __pgprot(_PAGE_GLOBAL)); if (err < 0) { printk(KERN_ERR "CPA %d failed %d\n", i, err); @@ -175,7 +174,7 @@ static __init int exercise_pageattr(void) pte ? (u64)pte_val(*pte) : 0ULL); failed++; } - if (level != LOWEST_LEVEL) { + if (level != PG_LEVEL_4K) { printk(KERN_ERR "CPA %lx: unexpected level %d\n", addr[i], level); failed++; @@ -183,7 +182,6 @@ static __init int exercise_pageattr(void) } vfree(bm); - cpa_flush_all(); failed += print_split(&sb); @@ -197,7 +195,7 @@ static __init int exercise_pageattr(void) failed++; continue; } - err = __change_page_attr_set(addr[i], len[i], + err = change_page_attr_set(addr[i], len[i], __pgprot(_PAGE_GLOBAL)); if (err < 0) { printk(KERN_ERR "CPA reverting failed: %d\n", err); @@ -211,7 +209,6 @@ static __init int exercise_pageattr(void) } } - cpa_flush_all(); failed += print_split(&sc); |