* [PATCH 2.6.27] x86: memtest fix use of reserve_early()
@ 2008-10-13 8:34 Daniele Calore
2008-10-21 8:08 ` Daniele Calore
2008-10-21 18:42 ` Yinghai Lu
0 siblings, 2 replies; 5+ messages in thread
From: Daniele Calore @ 2008-10-13 8:34 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel
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>
---
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
index 672e17f..9cab18b 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 */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.27] x86: memtest fix use of reserve_early()
2008-10-13 8:34 [PATCH 2.6.27] x86: memtest fix use of reserve_early() Daniele Calore
@ 2008-10-21 8:08 ` Daniele Calore
2008-10-21 18:42 ` Yinghai Lu
1 sibling, 0 replies; 5+ messages in thread
From: Daniele Calore @ 2008-10-21 8:08 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, linux-kernel,
Yinghai Lu
Cc: Daniele Calore
Hi Ingo and all,
Is there any news about this patch ?
AFAIK without this fix memtest is unusefull.
But if I'm wrong, apologise for the noise.
Bye,
Daniele
--
On Mon, 13 Oct 2008 10:34:12 +0200
Daniele Calore <orkaan@orkaan.org> wrote:
> 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>
>
> ---
> diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
> index 672e17f..9cab18b 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 */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.27] x86: memtest fix use of reserve_early()
2008-10-13 8:34 [PATCH 2.6.27] x86: memtest fix use of reserve_early() Daniele Calore
2008-10-21 8:08 ` Daniele Calore
@ 2008-10-21 18:42 ` Yinghai Lu
2008-10-22 1:48 ` He_Bob
2008-10-22 15:08 ` [PATCH 2.6.27] x86: memtest fix use of reserve_early() Ingo Molnar
1 sibling, 2 replies; 5+ messages in thread
From: Yinghai Lu @ 2008-10-21 18:42 UTC (permalink / raw)
To: Daniele Calore; +Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, linux-kernel
On Mon, Oct 13, 2008 at 1:34 AM, Daniele Calore <orkaan@orkaan.org> wrote:
> 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>
>
> ---
> diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
> index 672e17f..9cab18b 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 */
Acked-by: Yinghai Lu <yinghai@kernel.org>
Thanks
YH
^ permalink raw reply [flat|nested] 5+ messages in thread
* (no subject)
2008-10-21 18:42 ` Yinghai Lu
@ 2008-10-22 1:48 ` He_Bob
2008-10-22 15:08 ` [PATCH 2.6.27] x86: memtest fix use of reserve_early() Ingo Molnar
1 sibling, 0 replies; 5+ messages in thread
From: He_Bob @ 2008-10-22 1:48 UTC (permalink / raw)
To: linux-kernel
unsubscribe linux-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.27] x86: memtest fix use of reserve_early()
2008-10-21 18:42 ` Yinghai Lu
2008-10-22 1:48 ` He_Bob
@ 2008-10-22 15:08 ` Ingo Molnar
1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-10-22 15:08 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Daniele Calore, Thomas Gleixner, H. Peter Anvin, linux-kernel
* Yinghai Lu <yinghai@kernel.org> wrote:
> On Mon, Oct 13, 2008 at 1:34 AM, Daniele Calore <orkaan@orkaan.org> wrote:
> > 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>
> >
> > ---
> > diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c
> > index 672e17f..9cab18b 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 */
>
> Acked-by: Yinghai Lu <yinghai@kernel.org>
applied to tip/x86/urgent, thanks!
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-22 15:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 8:34 [PATCH 2.6.27] x86: memtest fix use of reserve_early() Daniele Calore
2008-10-21 8:08 ` Daniele Calore
2008-10-21 18:42 ` Yinghai Lu
2008-10-22 1:48 ` He_Bob
2008-10-22 15:08 ` [PATCH 2.6.27] x86: memtest fix use of reserve_early() Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox