diff options
Diffstat (limited to 'arch/x86_64/mm/init.c')
-rw-r--r-- | arch/x86_64/mm/init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 72f140f81b70..d14fb2dfbfc4 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -678,16 +678,15 @@ void free_initmem(void) | |||
678 | 678 | ||
679 | #ifdef CONFIG_DEBUG_RODATA | 679 | #ifdef CONFIG_DEBUG_RODATA |
680 | 680 | ||
681 | extern char __start_rodata, __end_rodata; | ||
682 | void mark_rodata_ro(void) | 681 | void mark_rodata_ro(void) |
683 | { | 682 | { |
684 | unsigned long addr = (unsigned long)&__start_rodata; | 683 | unsigned long addr = (unsigned long)__start_rodata; |
685 | 684 | ||
686 | for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) | 685 | for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE) |
687 | change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); | 686 | change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); |
688 | 687 | ||
689 | printk ("Write protecting the kernel read-only data: %luk\n", | 688 | printk ("Write protecting the kernel read-only data: %luk\n", |
690 | (&__end_rodata - &__start_rodata) >> 10); | 689 | (__end_rodata - __start_rodata) >> 10); |
691 | 690 | ||
692 | /* | 691 | /* |
693 | * change_page_attr_addr() requires a global_flush_tlb() call after it. | 692 | * change_page_attr_addr() requires a global_flush_tlb() call after it. |