diff options
author | Andi Kleen <ak@suse.de> | 2008-01-30 07:33:52 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:52 -0500 |
commit | 6ba9b7d8f0fe786954015ce5c0ef1837d5df56b7 (patch) | |
tree | bc01f61799e9023377c1925137f97c17344709c3 /arch/x86/mm/pageattr-test.c | |
parent | aaa0e89023656c078c67cbd0460fc2ccbf3323c6 (diff) |
x86: fix c_p_a() boot crash
fix:
> hm, i just found a failing 64-bit .config while testing your CPA
> patchset:
>
> [ 1.916541] CPA mapping 4k 0 large 2048 gb 0 x 0[0-0] miss 0
> [ 1.919874] Unable to handle kernel paging request at 000000000335aea8 RIP:
> [ 1.919874] [<ffffffff8021d2d3>] change_page_attr+0x3/0x61
> [ 1.919874] PGD 0
> [ 1.919874] Oops: 0000 [1]
> [ 1.919874] CPU 0
This handles addresses which don't have a mem_map entry.
Signed-off-by: Andi Kleen <ak@suse.de>
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index c58fab061762..91e05a26004d 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c | |||
@@ -177,7 +177,7 @@ static __init int exercise_pageattr(void) | |||
177 | continue; | 177 | continue; |
178 | } | 178 | } |
179 | 179 | ||
180 | err = change_page_attr(virt_to_page(addr[i]), len[i], | 180 | err = change_page_attr_addr(addr[i], len[i], |
181 | pte_pgprot(pte_clrhuge(pte_clrglobal(pte0)))); | 181 | pte_pgprot(pte_clrhuge(pte_clrglobal(pte0)))); |
182 | if (err < 0) { | 182 | if (err < 0) { |
183 | printk(KERN_ERR "CPA %d failed %d\n", i, err); | 183 | printk(KERN_ERR "CPA %d failed %d\n", i, err); |
@@ -212,7 +212,7 @@ static __init int exercise_pageattr(void) | |||
212 | failed++; | 212 | failed++; |
213 | continue; | 213 | continue; |
214 | } | 214 | } |
215 | err = change_page_attr(virt_to_page(addr[i]), len[i], | 215 | err = change_page_attr_addr(addr[i], len[i], |
216 | pte_pgprot(pte_mkglobal(*pte))); | 216 | pte_pgprot(pte_mkglobal(*pte))); |
217 | if (err < 0) { | 217 | if (err < 0) { |
218 | printk(KERN_ERR "CPA reverting failed: %d\n", err); | 218 | printk(KERN_ERR "CPA reverting failed: %d\n", err); |