diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-07-03 18:02:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:32 -0400 |
commit | 9af5b80765e4c30b8eba8218724459226fa5e81f (patch) | |
tree | 26f348bcfeb39b67a65381493832cf9848c36388 /arch | |
parent | dbe67df4ba78c79db547c7864e1120981c144c97 (diff) |
mm/ARM64: kill poison_init_mem()
Use free_reserved_area() to poison initmem memory pages and kill
poison_init_mem() on ARM64.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: <sworddragon2@aol.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Michel Lespinasse <walken@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/mm/init.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 997c6345cdd6..a398eb9018bb 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
@@ -197,14 +197,6 @@ void __init bootmem_init(void) | |||
197 | max_pfn = max_low_pfn = max; | 197 | max_pfn = max_low_pfn = max; |
198 | } | 198 | } |
199 | 199 | ||
200 | /* | ||
201 | * Poison init memory with an undefined instruction (0x0). | ||
202 | */ | ||
203 | static inline void poison_init_mem(void *s, size_t count) | ||
204 | { | ||
205 | memset(s, 0, count); | ||
206 | } | ||
207 | |||
208 | #ifndef CONFIG_SPARSEMEM_VMEMMAP | 200 | #ifndef CONFIG_SPARSEMEM_VMEMMAP |
209 | static inline void free_memmap(unsigned long start_pfn, unsigned long end_pfn) | 201 | static inline void free_memmap(unsigned long start_pfn, unsigned long end_pfn) |
210 | { | 202 | { |
@@ -386,8 +378,7 @@ void __init mem_init(void) | |||
386 | 378 | ||
387 | void free_initmem(void) | 379 | void free_initmem(void) |
388 | { | 380 | { |
389 | poison_init_mem(__init_begin, __init_end - __init_begin); | 381 | free_initmem_default(0); |
390 | free_initmem_default(-1); | ||
391 | } | 382 | } |
392 | 383 | ||
393 | #ifdef CONFIG_BLK_DEV_INITRD | 384 | #ifdef CONFIG_BLK_DEV_INITRD |
@@ -396,10 +387,8 @@ static int keep_initrd; | |||
396 | 387 | ||
397 | void free_initrd_mem(unsigned long start, unsigned long end) | 388 | void free_initrd_mem(unsigned long start, unsigned long end) |
398 | { | 389 | { |
399 | if (!keep_initrd) { | 390 | if (!keep_initrd) |
400 | poison_init_mem((void *)start, PAGE_ALIGN(end) - start); | 391 | free_reserved_area((void *)start, (void *)end, 0, "initrd"); |
401 | free_reserved_area((void *)start, (void *)end, -1, "initrd"); | ||
402 | } | ||
403 | } | 392 | } |
404 | 393 | ||
405 | static int __init keepinitrd_setup(char *__unused) | 394 | static int __init keepinitrd_setup(char *__unused) |