Commit 2cb0ebee authored by Daniele Calore's avatar Daniele Calore Committed by Ingo Molnar

x86: memtest fix use of reserve_early()

Hi all,

Wrong usage of 2nd parameter in reserve_early call.
66/75: reserve_early(start_bad, last_bad - start_bad, "BAD RAM");
                                ^^^^^^^^^^^^^^^^^^^^

The correct way is to use 'end' address and not 'size'.
As a bonus a fix to the printk format.
Signed-off-by: default avatarDaniele Calore <orkaan@orkaan.org>
Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 746e7cef
...@@ -61,9 +61,9 @@ static void __init memtest(unsigned long start_phys, unsigned long size, ...@@ -61,9 +61,9 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
last_bad += incr; last_bad += incr;
} else { } else {
if (start_bad) { if (start_bad) {
printk(KERN_CONT "\n %010lx bad mem addr %010lx - %010lx reserved", printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved",
val, start_bad, last_bad + incr); val, start_bad, last_bad + incr);
reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); reserve_early(start_bad, last_bad + incr, "BAD RAM");
} }
start_bad = last_bad = start_phys_aligned; start_bad = last_bad = start_phys_aligned;
} }
...@@ -72,9 +72,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size, ...@@ -72,9 +72,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
if (start_bad) { if (start_bad) {
printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved", printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved",
val, start_bad, last_bad + incr); val, start_bad, last_bad + incr);
reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); reserve_early(start_bad, last_bad + incr, "BAD RAM");
} }
} }
/* default is disabled */ /* default is disabled */
......
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