diff options
author | Daniele Calore <orkaan@orkaan.org> | 2008-10-13 10:34:12 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-22 17:08:06 +0200 |
commit | 2cb0ebeeb664e6eefe06951709949203e04f7c7b (patch) | |
tree | 099d3a8f131417924471920aa70fd5867f19fb1f /arch/x86/mm/memtest.c | |
parent | 746e7cef1b3de5516e07f16a448f0d2a092e3d36 (diff) | |
download | talos-obmc-linux-2cb0ebeeb664e6eefe06951709949203e04f7c7b.tar.gz talos-obmc-linux-2cb0ebeeb664e6eefe06951709949203e04f7c7b.zip |
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: Daniele Calore <orkaan@orkaan.org>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/memtest.c')
-rw-r--r-- | arch/x86/mm/memtest.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c index 672e17f8262a..9cab18b0b857 100644 --- a/arch/x86/mm/memtest.c +++ b/arch/x86/mm/memtest.c @@ -61,9 +61,9 @@ static void __init memtest(unsigned long start_phys, unsigned long size, last_bad += incr; } else { 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); - 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; } @@ -72,9 +72,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size, if (start_bad) { printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved", 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 */ |