diff options
Diffstat (limited to 'arch/i386/mm/init.c')
-rw-r--r-- | arch/i386/mm/init.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index c3b9905af2d5..4c4809f13cb1 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -432,7 +432,7 @@ static void __init pagetable_init (void) | |||
432 | paravirt_pagetable_setup_done(pgd_base); | 432 | paravirt_pagetable_setup_done(pgd_base); |
433 | } | 433 | } |
434 | 434 | ||
435 | #if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP) | 435 | #if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI) |
436 | /* | 436 | /* |
437 | * Swap suspend & friends need this for resume because things like the intel-agp | 437 | * Swap suspend & friends need this for resume because things like the intel-agp |
438 | * driver might have split up a kernel 4MB mapping. | 438 | * driver might have split up a kernel 4MB mapping. |
@@ -800,9 +800,17 @@ void mark_rodata_ro(void) | |||
800 | unsigned long start = PFN_ALIGN(_text); | 800 | unsigned long start = PFN_ALIGN(_text); |
801 | unsigned long size = PFN_ALIGN(_etext) - start; | 801 | unsigned long size = PFN_ALIGN(_etext) - start; |
802 | 802 | ||
803 | change_page_attr(virt_to_page(start), | 803 | #ifndef CONFIG_KPROBES |
804 | size >> PAGE_SHIFT, PAGE_KERNEL_RX); | 804 | #ifdef CONFIG_HOTPLUG_CPU |
805 | printk("Write protecting the kernel text: %luk\n", size >> 10); | 805 | /* It must still be possible to apply SMP alternatives. */ |
806 | if (num_possible_cpus() <= 1) | ||
807 | #endif | ||
808 | { | ||
809 | change_page_attr(virt_to_page(start), | ||
810 | size >> PAGE_SHIFT, PAGE_KERNEL_RX); | ||
811 | printk("Write protecting the kernel text: %luk\n", size >> 10); | ||
812 | } | ||
813 | #endif | ||
806 | start += size; | 814 | start += size; |
807 | size = (unsigned long)__end_rodata - start; | 815 | size = (unsigned long)__end_rodata - start; |
808 | change_page_attr(virt_to_page(start), | 816 | change_page_attr(virt_to_page(start), |