diff options
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index e0c1e98ad1bf..8a7b725ce3c7 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -569,22 +569,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
569 | free_page(addr); | 569 | free_page(addr); |
570 | totalram_pages++; | 570 | totalram_pages++; |
571 | } | 571 | } |
572 | #ifdef CONFIG_DEBUG_RODATA | ||
573 | /* | ||
574 | * This will make the __init pages not present and | ||
575 | * not executable, so that any attempt to use a | ||
576 | * __init function from now on will fault immediately | ||
577 | * rather than supriously later when memory gets reused. | ||
578 | * | ||
579 | * We only do this for DEBUG_RODATA to not break up the | ||
580 | * 2Mb kernel mapping just for this debug feature. | ||
581 | */ | ||
582 | if (begin >= __START_KERNEL_map) { | ||
583 | set_memory_rw(begin, (end - begin)/PAGE_SIZE); | ||
584 | set_memory_np(begin, (end - begin)/PAGE_SIZE); | ||
585 | set_memory_nx(begin, (end - begin)/PAGE_SIZE); | ||
586 | } | ||
587 | #endif | ||
588 | #endif | 572 | #endif |
589 | } | 573 | } |
590 | 574 | ||