aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/mm')
-rw-r--r--arch/i386/mm/init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index dc5d8979cd64..89e8486aac34 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -725,16 +725,15 @@ static int noinline do_test_wp_bit(void)
725 725
726#ifdef CONFIG_DEBUG_RODATA 726#ifdef CONFIG_DEBUG_RODATA
727 727
728extern char __start_rodata, __end_rodata;
729void mark_rodata_ro(void) 728void mark_rodata_ro(void)
730{ 729{
731 unsigned long addr = (unsigned long)&__start_rodata; 730 unsigned long addr = (unsigned long)__start_rodata;
732 731
733 for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) 732 for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE)
734 change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO); 733 change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO);
735 734
736 printk ("Write protecting the kernel read-only data: %luk\n", 735 printk("Write protecting the kernel read-only data: %uk\n",
737 (unsigned long)(&__end_rodata - &__start_rodata) >> 10); 736 (__end_rodata - __start_rodata) >> 10);
738 737
739 /* 738 /*
740 * change_page_attr() requires a global_flush_tlb() call after it. 739 * change_page_attr() requires a global_flush_tlb() call after it.