aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/init_64.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2008-01-30 13:34:06 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:34:06 +0100
commit6d238cc4dc8a36a3915c26202fe49f58a0683fb9 (patch)
treef17d1b7d27ab48ba3b5f998a8a286c198b052ce2 /arch/x86/mm/init_64.c
parent75cbade8ea3127a84e3da7c2c15808e54f0df7e8 (diff)
x86: convert CPA users to the new set_page_ API
This patch converts various users of change_page_attr() to the new, more intent driven set_page_*/set_memory_* API set. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r--arch/x86/mm/init_64.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index c250580a943..05bb12db0b0 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -556,8 +556,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
init_page_count(virt_to_page(addr));
memset((void *)(addr & ~(PAGE_SIZE-1)),
POISON_FREE_INITMEM, PAGE_SIZE);
- if (addr >= __START_KERNEL_map)
- change_page_attr_addr(addr, 1, __pgprot(0));
free_page(addr);
totalram_pages++;
}
@@ -594,13 +592,13 @@ void mark_rodata_ro(void)
if (end <= start)
return;
- change_page_attr_addr(start, (end - start) >> PAGE_SHIFT, PAGE_KERNEL_RO);
+ set_memory_ro(start, (end - start) >> PAGE_SHIFT);
printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
(end - start) >> 10);
/*
- * change_page_attr_addr() requires a global_flush_tlb() call after it.
+ * set_memory_*() requires a global_flush_tlb() call after it.
* We do this after the printk so that if something went wrong in the
* change, the printk gets out at least to give a better debug hint
* of who is the culprit.
@@ -609,11 +607,11 @@ void mark_rodata_ro(void)
#ifdef CONFIG_CPA_DEBUG
printk("Testing CPA: undo %lx-%lx\n", start, end);
- change_page_attr_addr(start, (end - start) >> PAGE_SHIFT, PAGE_KERNEL);
+ set_memory_rw(start, (end-start) >> PAGE_SHIFT);
global_flush_tlb();
printk("Testing CPA: again\n");
- change_page_attr_addr(start, (end - start) >> PAGE_SHIFT, PAGE_KERNEL_RO);
+ set_memory_ro(start, (end-start) >> PAGE_SHIFT);
global_flush_tlb();
#endif
}