Commit f373bafc authored by Vladimir Murzin's avatar Vladimir Murzin Committed by Linus Torvalds

memtest: cleanup log messages

- prefer pr_info(...  to printk(KERN_INFO ...
- use %pa for phys_addr_t
- use cpu_to_be64 while printing pattern in reserve_bad_mem()
Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Cc: Leon Romanovsky <leon@leon.nu>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 06f80596
...@@ -31,10 +31,8 @@ static u64 patterns[] __initdata = { ...@@ -31,10 +31,8 @@ static u64 patterns[] __initdata = {
static void __init reserve_bad_mem(u64 pattern, phys_addr_t start_bad, phys_addr_t end_bad) static void __init reserve_bad_mem(u64 pattern, phys_addr_t start_bad, phys_addr_t end_bad)
{ {
printk(KERN_INFO " %016llx bad mem addr %010llx - %010llx reserved\n", pr_info(" %016llx bad mem addr %pa - %pa reserved\n",
(unsigned long long) pattern, cpu_to_be64(pattern), &start_bad, &end_bad);
(unsigned long long) start_bad,
(unsigned long long) end_bad);
memblock_reserve(start_bad, end_bad - start_bad); memblock_reserve(start_bad, end_bad - start_bad);
} }
...@@ -79,10 +77,8 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end) ...@@ -79,10 +77,8 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end)
this_start = clamp(this_start, start, end); this_start = clamp(this_start, start, end);
this_end = clamp(this_end, start, end); this_end = clamp(this_end, start, end);
if (this_start < this_end) { if (this_start < this_end) {
printk(KERN_INFO " %010llx - %010llx pattern %016llx\n", pr_info(" %pa - %pa pattern %016llx\n",
(unsigned long long)this_start, &this_start, &this_end, cpu_to_be64(pattern));
(unsigned long long)this_end,
(unsigned long long)cpu_to_be64(pattern));
memtest(pattern, this_start, this_end - this_start); memtest(pattern, this_start, this_end - this_start);
} }
} }
...@@ -113,7 +109,7 @@ void __init early_memtest(phys_addr_t start, phys_addr_t end) ...@@ -113,7 +109,7 @@ void __init early_memtest(phys_addr_t start, phys_addr_t end)
if (!memtest_pattern) if (!memtest_pattern)
return; return;
printk(KERN_INFO "early_memtest: # of tests: %d\n", memtest_pattern); pr_info("early_memtest: # of tests: %u\n", memtest_pattern);
for (i = memtest_pattern-1; i < UINT_MAX; --i) { for (i = memtest_pattern-1; i < UINT_MAX; --i) {
idx = i % ARRAY_SIZE(patterns); idx = i % ARRAY_SIZE(patterns);
do_one_pass(patterns[idx], start, end); do_one_pass(patterns[idx], start, end);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment