arm: add support for memtest
authorVladimir Murzin <vladimir.murzin@arm.com>
Tue, 14 Apr 2015 22:48:37 +0000 (15:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2015 23:49:06 +0000 (16:49 -0700)
Add support for memtest command line option.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/mm/init.c

index 1609b022a72fa20254bf367dbb5e41d8e9e84f67..3d0e9aed4b40990111213feeb5ff96fd8ab9e09b 100644 (file)
@@ -335,6 +335,9 @@ void __init bootmem_init(void)
 
        find_limits(&min, &max_low, &max_high);
 
+       early_memtest((phys_addr_t)min << PAGE_SHIFT,
+                     (phys_addr_t)max_low << PAGE_SHIFT);
+
        /*
         * Sparsemem tries to allocate bootmem in memory_present(),
         * so must be done after the fixed reservations