x86: seperate memtest from init_64.c
Subsystems (3)
PATCH 1/1 x86: seperate memtest from init_64.c
Signed-off-by Yinghai Lu <[email protected]>
--- arch/x86/mm/Makefile | 1 arch/x86/mm/init_64.c | 112 -------------------------------------------- arch/x86/mm/memtest.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++ include/asm-x86/e820.h | 8 +++ 4 files changed, 132 insertions(+), 112 deletions(-)
arch/x86/mm/Makefile +1 -0
@@ -23,3 +23,4 @@ obj-$(CONFIG_K8_NUMA) += k8topology_64. endif obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o +obj-$(CONFIG_MEMTEST) += memtest.o
arch/x86/mm/init_64.c +0 -112
118 lines not on this page · raw message
arch/x86/mm/memtest.c new file +123 -0
123 lines not on this page · raw message
include/asm-x86/e820.h +8 -0
@@ -89,6 +89,14 @@ static inline void e820_mark_nosave_regi }#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 end_user_pfn;extern u64 find_e820_area (u64 start,u64 end,u64 size,u64 align);
PATCH 1/1 x86: make memtest support 32bit
only support max_low_pfn below...
Signed-off-by Yinghai Lu <[email protected]>
--- Documentation/kernel-parameters.txt | 2 +- arch/x86/Kconfig | 1 - arch/x86/mm/init_32.c | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-)
Documentation/kernel-parameters.txt +1 -1
@@ -1200,7 +1200,7 @@ and is between 256 and 4096 characters. or memmap=0x10000$0x18690000 - memtest= [KNL,X86_64] Enable memtest + memtest= [KNL,X86] Enable memtest Format: <integer> range: 0,4 : pattern number default : 0 <disable>
arch/x86/mm/init_32.c +3 -0
@@ -844,6 +844,9 @@ unsigned long __init_refok init_memory_mreserve_early (table_start <<PAGE_SHIFT , table_end <<PAGE_SHIFT ,"PGTABLE" ); +if (!after_init_bootmem) +early_memtest (start, end); +return end >>PAGE_SHIFT ; }
arch/x86/Kconfig +0 -1
@@ -448,7 +448,6 @@ config PARAVIRT_DEBUG config MEMTEST bool "Memtest" - depends on X86_64 default y help This option adds a kernel parameter 'memtest', which allows memtest
Re: [PATCH] x86: make memtest support 32bit
Quoted 1 line · Yinghai Lu
only support
max_low_pfnbelow...
.... either add a fixmap or document that 32bit memtest will only test a small fraction of the available memory on systems with >1GB. In fact with this restriction it seems rather useless.
-Andi
Re: [PATCH] x86: make memtest support 32bit
In reply to Yinghai LuQuoted 1 line · Yinghai Lu
only support
max_low_pfnbelow...
applied to tip/x86/memtest - thanks Yinghai.
Ingo