All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] x86: memtest: adapt log messages
Date: Fri, 13 Feb 2009 15:55:17 +0100	[thread overview]
Message-ID: <20090213145517.GD13000@alberich.amd.com> (raw)
In-Reply-To: <20090213144600.GA6298@alberich.amd.com>

Adapt log messages to

* print test pattern instead of pattern number,
* correct format for output on 32-bit
* show pattern as stored in memory.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
 arch/x86/mm/memtest.c |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index 82321d9..54c143b 100644
--- a/arch/x86/mm/memtest.c
+++ b/arch/x86/mm/memtest.c
@@ -24,9 +24,13 @@ static unsigned long patterns[] = {
 static void reserve_bad_mem(unsigned long pattern, unsigned long start_bad,
 			    unsigned long end_bad)
 {
-	printk(KERN_CONT "\n  %016lx bad mem addr "
-	       "%010lx - %010lx reserved",
-	       pattern, start_bad, end_bad);
+#ifdef CONFIG_X86_64
+	printk(KERN_CONT "\n  %016llx bad mem addr %010lx - %010lx reserved",
+	       cpu_to_be64(pattern), start_bad, end_bad);
+#else
+	printk(KERN_CONT "\n  %08x bad mem addr %010lx - %010lx reserved",
+	       cpu_to_be32(pattern), start_bad, end_bad);
+#endif
 	reserve_early(start_bad, end_bad, "BAD RAM");
 }
 
@@ -86,7 +90,7 @@ void __init early_memtest(unsigned long start, unsigned long end)
 	if (!memtest_pattern)
 		return;
 
-	printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern);
+	printk(KERN_INFO "early_memtest: number of tests %d", memtest_pattern);
 	for (i = 0; i < memtest_pattern; i++) {
 		unsigned int idx = i % ARRAY_SIZE(patterns);
 		pattern = patterns[idx];
@@ -101,10 +105,13 @@ void __init early_memtest(unsigned long start, unsigned long end)
 			if (t_start + t_size > end)
 				t_size = end - t_start;
 
-			printk(KERN_CONT "\n  %010llx - %010llx pattern %d",
-			       (unsigned long long)t_start,
-			       (unsigned long long)t_start + t_size, idx);
-
+#ifdef CONFIG_X86_64
+			printk(KERN_CONT "\n  %010llx - %010llx pattern %016llx",
+			       t_start, t_start + t_size, cpu_to_be64(pattern));
+#else
+			printk(KERN_CONT "\n  %010llx - %010llx pattern %08x",
+			       t_start, t_start + t_size, cpu_to_be32(pattern));
+#endif
 			memtest(t_start, t_size, pattern);
 
 			t_start += t_size;
-- 
1.6.1.2




  parent reply	other threads:[~2009-02-13 14:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13 14:46 [PATCH 0/7] x86: memtest update Andreas Herrmann
2009-02-13 14:49 ` [PATCH 1/7] x86: memtest: reuse test patterns when memtest parameter exceeds number of available patterns Andreas Herrmann
2009-02-13 14:51 ` [PATCH 2/7] x86: memtest: introduce array to store memtest patterns Andreas Herrmann
2009-02-13 17:52   ` H. Peter Anvin
2009-02-17 10:24     ` Andreas Herrmann
2009-02-17 20:58       ` Yinghai Lu
2009-02-13 14:52 ` [PATCH 3/7] x86: memtest: cleanup memtest function Andreas Herrmann
2009-02-13 14:55 ` Andreas Herrmann [this message]
2009-02-13 16:53   ` [PATCH 4/7] x86: memtest: adapt log messages Ingo Molnar
2009-02-13 17:04     ` Jaswinder Singh Rajput
2009-02-13 17:46       ` H. Peter Anvin
2009-02-17 10:27         ` Andreas Herrmann
2009-02-17 10:29     ` Andreas Herrmann
2009-02-13 14:57 ` [PATCH 5/7] x86: memtest: add additional (silly) test patterns Andreas Herrmann
2009-02-13 14:59 ` [PATCH 6/7] x86: memtest: wipe out test pattern from memory Andreas Herrmann
2009-02-13 15:00 ` [PATCH 7/7] x86: update description for memtest boot parameter Andreas Herrmann
  -- strict thread matches above, loose matches on Subject: below --
2009-02-25 10:23 [PATCH 0/7 v2] x86: memtest update Andreas Herrmann
2009-02-25 10:28 ` [PATCH 4/7] x86: memtest: adapt log messages Andreas Herrmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090213145517.GD13000@alberich.amd.com \
    --to=andreas.herrmann3@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.