x86: memtest: WARN if bad RAM found
authorBen Hutchings <ben@decadent.org.uk>
Mon, 5 Dec 2011 04:00:58 +0000 (04:00 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 2 Mar 2018 07:52:22 +0000 (07:52 +0000)
Since this is not a particularly thorough test, if we find any bad
bits of RAM then there is a fair chance that there are other bad bits
we fail to detect.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Topic features/x86
Gbp-Pq: Name x86-memtest-WARN-if-bad-RAM-found.patch

mm/memtest.c

index 8eaa4c3a5f65a86bd3f465455960b573b9434273..dbb107a62b0c54b7bc5d60e12dcb4be6f8bb2423 100644 (file)
@@ -26,6 +26,10 @@ static u64 patterns[] __initdata = {
 
 static void __init reserve_bad_mem(u64 pattern, phys_addr_t start_bad, phys_addr_t end_bad)
 {
+#ifdef CONFIG_X86
+       WARN_ONCE(1, "Bad RAM detected. Use memtest86+ to perform a thorough test\n"
+                 "and the memmap= parameter to reserve the bad areas.");
+#endif
        pr_info("  %016llx bad mem addr %pa - %pa reserved\n",
                cpu_to_be64(pattern), &start_bad, &end_bad);
        memblock_reserve(start_bad, end_bad - start_bad);