aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-08-28 16:58:39 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-05 11:09:57 -0400
commit110e0358e7dfd9cc56d47077068f3680dae10b56 (patch)
tree0365091b17e6ca75c571f007cd8fd6d6d2f9fdbd
parentc09ff7e1744047be1043cb32453ef90b7f6b8451 (diff)
x86: make sure the CPA test code's use of _PAGE_UNUSED1 is obvious
The CPA test code uses _PAGE_UNUSED1, so make sure its obvious. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/mm/pageattr-test.c6
-rw-r--r--include/asm-x86/pgtable.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index 7c3017287119..e1d106909218 100644
--- a/arch/x86/mm/pageattr-test.c
+++ b/arch/x86/mm/pageattr-test.c
@@ -32,7 +32,7 @@ enum {
32 GPS = (1<<30) 32 GPS = (1<<30)
33}; 33};
34 34
35#define PAGE_TESTBIT __pgprot(_PAGE_UNUSED1) 35#define PAGE_CPA_TEST __pgprot(_PAGE_CPA_TEST)
36 36
37static int pte_testbit(pte_t pte) 37static int pte_testbit(pte_t pte)
38{ 38{
@@ -174,7 +174,7 @@ static int pageattr_test(void)
174 } 174 }
175 175
176 test_addr = addr[i]; 176 test_addr = addr[i];
177 err = change_page_attr_set(&test_addr, len[i], PAGE_TESTBIT, 0); 177 err = change_page_attr_set(&test_addr, len[i], PAGE_CPA_TEST, 0);
178 if (err < 0) { 178 if (err < 0) {
179 printk(KERN_ERR "CPA %d failed %d\n", i, err); 179 printk(KERN_ERR "CPA %d failed %d\n", i, err);
180 failed++; 180 failed++;
@@ -207,7 +207,7 @@ static int pageattr_test(void)
207 continue; 207 continue;
208 } 208 }
209 test_addr = addr[i]; 209 test_addr = addr[i];
210 err = change_page_attr_clear(&test_addr, len[i], PAGE_TESTBIT, 0); 210 err = change_page_attr_clear(&test_addr, len[i], PAGE_CPA_TEST, 0);
211 if (err < 0) { 211 if (err < 0) {
212 printk(KERN_ERR "CPA reverting failed: %d\n", err); 212 printk(KERN_ERR "CPA reverting failed: %d\n", err);
213 failed++; 213 failed++;
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 04caa2f544df..eccd52406ab1 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -19,6 +19,7 @@
19#define _PAGE_BIT_UNUSED3 11 19#define _PAGE_BIT_UNUSED3 11
20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ 20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
21#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 21#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
22#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1
22#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ 23#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
23 24
24#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT) 25#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
@@ -36,6 +37,7 @@
36#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) 37#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
37#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) 38#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
38#define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) 39#define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
40#define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
39#define __HAVE_ARCH_PTE_SPECIAL 41#define __HAVE_ARCH_PTE_SPECIAL
40 42
41#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) 43#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)