mm: move memtest under /mm
There is nothing platform dependent in the core memtest code, so other platform might benefit of this feature too. Change-Id: I2f1fca080cffe1d887fe724885e337e7117482d8 Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Patch-mainline: linux-arm-kernel @ 03/09/15, 10:27 Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
This commit is contained in:
parent
5df1d9fc01
commit
1b232e30e9
|
@ -669,17 +669,6 @@ endif #HYPERVISOR_GUEST
|
|||
config NO_BOOTMEM
|
||||
def_bool y
|
||||
|
||||
config MEMTEST
|
||||
bool "Memtest"
|
||||
---help---
|
||||
This option adds a kernel parameter 'memtest', which allows memtest
|
||||
to be set.
|
||||
memtest=0, mean disabled; -- default
|
||||
memtest=1, mean do 1 test pattern;
|
||||
...
|
||||
memtest=4, mean do 4 test patterns.
|
||||
If you are unsure how to answer this question, answer N.
|
||||
|
||||
config X86_SUMMIT_NUMA
|
||||
def_bool y
|
||||
depends on X86_32 && NUMA && X86_32_NON_STANDARD
|
||||
|
|
|
@ -40,14 +40,6 @@ static inline void e820_mark_nosave_regions(unsigned long limit_pfn)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MEMTEST
|
||||
extern void early_memtest(unsigned long start, unsigned long end);
|
||||
#else
|
||||
static inline void early_memtest(unsigned long start, unsigned long end)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
extern unsigned long e820_end_of_ram_pfn(void);
|
||||
extern unsigned long e820_end_of_low_ram_pfn(void);
|
||||
extern u64 early_reserve_e820(u64 sizet, u64 align);
|
||||
|
|
|
@ -26,5 +26,3 @@ obj-$(CONFIG_NUMA) += numa.o numa_$(BITS).o
|
|||
obj-$(CONFIG_AMD_NUMA) += amdtopology.o
|
||||
obj-$(CONFIG_ACPI_NUMA) += srat.o
|
||||
obj-$(CONFIG_NUMA_EMU) += numa_emulation.o
|
||||
|
||||
obj-$(CONFIG_MEMTEST) += memtest.o
|
||||
|
|
|
@ -248,6 +248,14 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo
|
|||
#define __initdata_memblock
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MEMTEST
|
||||
extern void early_memtest(unsigned long start, unsigned long end);
|
||||
#else
|
||||
static inline void early_memtest(unsigned long start, unsigned long end)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align)
|
||||
{
|
||||
|
|
|
@ -1611,6 +1611,17 @@ config PANIC_ON_DATA_CORRUPTION
|
|||
recoverable data corruption scenarios to system-halting panics,
|
||||
for easier detection and debug.
|
||||
|
||||
config MEMTEST
|
||||
bool "Memtest"
|
||||
---help---
|
||||
This option adds a kernel parameter 'memtest', which allows memtest
|
||||
to be set.
|
||||
memtest=0, mean disabled; -- default
|
||||
memtest=1, mean do 1 test pattern;
|
||||
...
|
||||
memtest=4, mean do 4 test patterns.
|
||||
If you are unsure how to answer this question, answer N.
|
||||
|
||||
source "samples/Kconfig"
|
||||
|
||||
source "lib/Kconfig.kgdb"
|
||||
|
|
|
@ -63,3 +63,4 @@ obj-$(CONFIG_MEMORY_ISOLATION) += page_isolation.o
|
|||
obj-$(CONFIG_PAGE_OWNER) += pageowner.o
|
||||
obj-$(CONFIG_ZBUD) += zbud.o
|
||||
obj-$(CONFIG_GENERIC_EARLY_IOREMAP) += early_ioremap.o
|
||||
obj-$(CONFIG_MEMTEST) += memtest.o
|
||||
|
|
|
@ -74,7 +74,7 @@ static void __init do_one_pass(u64 pattern, u64 start, u64 end)
|
|||
u64 i;
|
||||
phys_addr_t this_start, this_end;
|
||||
|
||||
for_each_free_mem_range(i, MAX_NUMNODES, &this_start, &this_end, NULL) {
|
||||
for_each_free_mem_range(i, NUMA_NO_NODE, &this_start, &this_end, NULL) {
|
||||
this_start = clamp_t(phys_addr_t, this_start, start, end);
|
||||
this_end = clamp_t(phys_addr_t, this_end, start, end);
|
||||
if (this_start < this_end) {
|
Loading…
Reference in New Issue