diff options
Diffstat (limited to 'arch/x86_64/mm/init.c')
-rw-r--r-- | arch/x86_64/mm/init.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 51fbf3eddf13..95bd232ff0cf 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/poison.h> | ||
26 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
28 | #include <linux/memory_hotplug.h> | 29 | #include <linux/memory_hotplug.h> |
@@ -660,7 +661,8 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
660 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | 661 | for (addr = begin; addr < end; addr += PAGE_SIZE) { |
661 | ClearPageReserved(virt_to_page(addr)); | 662 | ClearPageReserved(virt_to_page(addr)); |
662 | init_page_count(virt_to_page(addr)); | 663 | init_page_count(virt_to_page(addr)); |
663 | memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); | 664 | memset((void *)(addr & ~(PAGE_SIZE-1)), |
665 | POISON_FREE_INITMEM, PAGE_SIZE); | ||
664 | free_page(addr); | 666 | free_page(addr); |
665 | totalram_pages++; | 667 | totalram_pages++; |
666 | } | 668 | } |
@@ -668,7 +670,8 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
668 | 670 | ||
669 | void free_initmem(void) | 671 | void free_initmem(void) |
670 | { | 672 | { |
671 | memset(__initdata_begin, 0xba, __initdata_end - __initdata_begin); | 673 | memset(__initdata_begin, POISON_FREE_INITDATA, |
674 | __initdata_end - __initdata_begin); | ||
672 | free_init_pages("unused kernel memory", | 675 | free_init_pages("unused kernel memory", |
673 | (unsigned long)(&__init_begin), | 676 | (unsigned long)(&__init_begin), |
674 | (unsigned long)(&__init_end)); | 677 | (unsigned long)(&__init_end)); |