[PATCH resend v3] x86: memtest: WARN if bad RAM found

From: Jonathan Nieder
Date: Mon Apr 23 2012 - 14:26:37 EST


From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Date: Mon, 5 Dec 2011 04:00:58 +0000

The novice who enables CONFIG_MEMTEST may not realize that it 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; add
a WARNING for this situation so people helping debug ensuing problems
can understand what happened.

The warning text gives advice to allow the sysadmin to run a more
thorough test and suppress the warning.

Bad RAM detected. Use memtest86+ to perform a thorough test
and the memmap= parameter to reserve the bad areas.

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
Jonathan Nieder wrote:

> The patch below last visited this list on 2 April, about a week and a
> half ago. No reply.

Are Ben and I the only ones who care either way about this change?

arch/x86/mm/memtest.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index c80b9fb95734..38caeb44a218 100644
--- a/arch/x86/mm/memtest.c
+++ b/arch/x86/mm/memtest.c
@@ -30,6 +30,8 @@ static u64 patterns[] __initdata = {

static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad)
{
+ WARN_ONCE(1, "Bad RAM detected. Use memtest86+ to perform a thorough test\n"
+ "and the memmap= parameter to reserve the bad areas.");
printk(KERN_INFO " %016llx bad mem addr %010llx - %010llx reserved\n",
(unsigned long long) pattern,
(unsigned long long) start_bad,
--
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/