aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_64.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-02-01 05:25:06 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-02-01 05:28:36 -0500
commit68d00bbebb5a48b7a9056a8c03476a71ecbc30a6 (patch)
tree95af63041b79c43be37d734da6073fc82070f769 /arch/x86/mm/init_64.c
parentac2cbab21f318e19bc176a7f38a120cec835220f (diff)
parent07f4207a305c834f528d08428df4531744e25678 (diff)
Merge remote-tracking branch 'origin/x86/mm' into x86/mm2
Explicitly merging these two branches due to nontrivial conflicts and to allow further work. Resolved Conflicts: arch/x86/kernel/head32.c arch/x86/kernel/head64.c arch/x86/mm/init_64.c arch/x86/realmode/init.c Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r--arch/x86/mm/init_64.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index e2fcbc34c9df..edaa2daf4b37 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -804,12 +804,10 @@ void set_kernel_text_ro(void)
804void mark_rodata_ro(void) 804void mark_rodata_ro(void)
805{ 805{
806 unsigned long start = PFN_ALIGN(_text); 806 unsigned long start = PFN_ALIGN(_text);
807 unsigned long rodata_start = 807 unsigned long rodata_start = PFN_ALIGN(__start_rodata);
808 ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK;
809 unsigned long end = (unsigned long) &__end_rodata_hpage_align; 808 unsigned long end = (unsigned long) &__end_rodata_hpage_align;
810 unsigned long text_end = PAGE_ALIGN((unsigned long) &__stop___ex_table); 809 unsigned long text_end = PFN_ALIGN(&__stop___ex_table);
811 unsigned long rodata_end = PAGE_ALIGN((unsigned long) &__end_rodata); 810 unsigned long rodata_end = PFN_ALIGN(&__end_rodata);
812 unsigned long data_start = (unsigned long) &_sdata;
813 unsigned long all_end = PFN_ALIGN(&_end); 811 unsigned long all_end = PFN_ALIGN(&_end);
814 812
815 printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n", 813 printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
@@ -835,12 +833,12 @@ void mark_rodata_ro(void)
835#endif 833#endif
836 834
837 free_init_pages("unused kernel memory", 835 free_init_pages("unused kernel memory",
838 (unsigned long) page_address(virt_to_page(text_end)), 836 (unsigned long) __va(__pa_symbol(text_end)),
839 (unsigned long) 837 (unsigned long) __va(__pa_symbol(rodata_start)));
840 page_address(virt_to_page(rodata_start))); 838
841 free_init_pages("unused kernel memory", 839 free_init_pages("unused kernel memory",
842 (unsigned long) page_address(virt_to_page(rodata_end)), 840 (unsigned long) __va(__pa_symbol(rodata_end)),
843 (unsigned long) page_address(virt_to_page(data_start))); 841 (unsigned long) __va(__pa_symbol(_sdata)));
844} 842}
845 843
846#endif 844#endif