diff options
author | Andreas Herrmann <andreas.herrmann3@amd.com> | 2009-02-25 05:28:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-25 06:19:46 -0500 |
commit | 570c9e69aaa84689fb8ed2a3a4af39ca54ba7a47 (patch) | |
tree | 553464aacf15666f3497c2d96620915d310421e3 /arch/x86/mm/memtest.c | |
parent | 7dad169e57eda1f0aa6dc5ac43a898b4b0ced2c7 (diff) |
x86: memtest: adapt log messages
- print test pattern instead of pattern number,
- show pattern as stored in memory,
- use proper priority flags,
- consistent use of u64 throughout the code
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/memtest.c')
-rw-r--r-- | arch/x86/mm/memtest.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c index 01a72d6825be..3232397783ae 100644 --- a/arch/x86/mm/memtest.c +++ b/arch/x86/mm/memtest.c | |||
@@ -16,25 +16,22 @@ static u64 patterns[] __initdata = { | |||
16 | 0xaaaaaaaaaaaaaaaaULL, | 16 | 0xaaaaaaaaaaaaaaaaULL, |
17 | }; | 17 | }; |
18 | 18 | ||
19 | static void __init reserve_bad_mem(u64 pattern, unsigned long start_bad, | 19 | static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad) |
20 | unsigned long end_bad) | ||
21 | { | 20 | { |
22 | printk(KERN_CONT "\n %016llx bad mem addr " | 21 | printk(KERN_INFO " %016llx bad mem addr %010llx - %010llx reserved\n", |
23 | "%010lx - %010lx reserved", | 22 | (unsigned long long) pattern, |
24 | (unsigned long long) pattern, start_bad, end_bad); | 23 | (unsigned long long) start_bad, |
24 | (unsigned long long) end_bad); | ||
25 | reserve_early(start_bad, end_bad, "BAD RAM"); | 25 | reserve_early(start_bad, end_bad, "BAD RAM"); |
26 | } | 26 | } |
27 | 27 | ||
28 | static void __init memtest(unsigned long start_phys, unsigned long size, | 28 | static void __init memtest(u64 pattern, u64 start_phys, u64 size) |
29 | u64 pattern) | ||
30 | { | 29 | { |
31 | unsigned long i; | 30 | u64 i, count; |
32 | u64 *start; | 31 | u64 *start; |
33 | unsigned long start_bad; | 32 | u64 start_bad, last_bad; |
34 | unsigned long last_bad; | 33 | u64 start_phys_aligned; |
35 | unsigned long start_phys_aligned; | 34 | size_t incr; |
36 | unsigned long count; | ||
37 | unsigned long incr; | ||
38 | 35 | ||
39 | incr = sizeof(pattern); | 36 | incr = sizeof(pattern); |
40 | start_phys_aligned = ALIGN(start_phys, incr); | 37 | start_phys_aligned = ALIGN(start_phys, incr); |
@@ -81,7 +78,7 @@ void __init early_memtest(unsigned long start, unsigned long end) | |||
81 | if (!memtest_pattern) | 78 | if (!memtest_pattern) |
82 | return; | 79 | return; |
83 | 80 | ||
84 | printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern); | 81 | printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern); |
85 | for (i = 0; i < memtest_pattern; i++) { | 82 | for (i = 0; i < memtest_pattern; i++) { |
86 | unsigned int idx = i % ARRAY_SIZE(patterns); | 83 | unsigned int idx = i % ARRAY_SIZE(patterns); |
87 | pattern = patterns[idx]; | 84 | pattern = patterns[idx]; |
@@ -96,14 +93,13 @@ void __init early_memtest(unsigned long start, unsigned long end) | |||
96 | if (t_start + t_size > end) | 93 | if (t_start + t_size > end) |
97 | t_size = end - t_start; | 94 | t_size = end - t_start; |
98 | 95 | ||
99 | printk(KERN_CONT "\n %010llx - %010llx pattern %d", | 96 | printk(KERN_INFO " %010llx - %010llx pattern %016llx\n", |
100 | (unsigned long long)t_start, | 97 | (unsigned long long) t_start, |
101 | (unsigned long long)t_start + t_size, idx); | 98 | (unsigned long long) t_start + t_size, |
102 | 99 | (unsigned long long) cpu_to_be64(pattern)); | |
103 | memtest(t_start, t_size, pattern); | 100 | memtest(pattern, t_start, t_size); |
104 | 101 | ||
105 | t_start += t_size; | 102 | t_start += t_size; |
106 | } | 103 | } |
107 | } | 104 | } |
108 | printk(KERN_CONT "\n"); | ||
109 | } | 105 | } |