2008-07-10 12:37:56

by Joe Jin

[permalink] [raw]
Subject: [PATCH] x86_64: reserve crashkernel bootmem before reserve dma32 bootmem

Before reserve_crashkernel, dma32_reserve_bootmem would reserve 128M memory.
this cuased crashkernel end address must less than 64M or start address must
more than 192M except crashkernel memory reserved before dma32 memory reserved.

This patch against 2.6.26-rc9

Signed-off-by: Joe Jin <[email protected]>
---
setup_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.26-rc9/arch/x86/kernel/setup_64.c.orig 2008-07-10 16:34:12.000000000 +0800
+++ linux-2.6.26-rc9/arch/x86/kernel/setup_64.c 2008-07-10 16:35:00.000000000 +0800
@@ -444,8 +444,6 @@ void __init setup_arch(char **cmdline_p)
contig_initmem_init(0, end_pfn);
#endif

- dma32_reserve_bootmem();
-
#ifdef CONFIG_ACPI_SLEEP
/*
* Reserve low memory region for sleep support.
@@ -486,6 +484,8 @@ void __init setup_arch(char **cmdline_p)
#endif
reserve_crashkernel();

+ dma32_reserve_bootmem();
+
reserve_ibft_region();

paging_init();


2008-07-10 17:32:45

by Yinghai Lu

[permalink] [raw]
Subject: Re: [PATCH] x86_64: reserve crashkernel bootmem before reserve dma32 bootmem

On Thu, Jul 10, 2008 at 5:34 AM, Joe Jin <[email protected]> wrote:
> Before reserve_crashkernel, dma32_reserve_bootmem would reserve 128M memory.
> this cuased crashkernel end address must less than 64M or start address must
> more than 192M except crashkernel memory reserved before dma32 memory reserved.
>
> This patch against 2.6.26-rc9
>
> Signed-off-by: Joe Jin <[email protected]>
> ---
> setup_64.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-2.6.26-rc9/arch/x86/kernel/setup_64.c.orig 2008-07-10 16:34:12.000000000 +0800
> +++ linux-2.6.26-rc9/arch/x86/kernel/setup_64.c 2008-07-10 16:35:00.000000000 +0800
> @@ -444,8 +444,6 @@ void __init setup_arch(char **cmdline_p)
> contig_initmem_init(0, end_pfn);
> #endif
>
> - dma32_reserve_bootmem();
> -
> #ifdef CONFIG_ACPI_SLEEP
> /*
> * Reserve low memory region for sleep support.
> @@ -486,6 +484,8 @@ void __init setup_arch(char **cmdline_p)
> #endif
> reserve_crashkernel();
>
> + dma32_reserve_bootmem();
> +
> reserve_ibft_region();
>
> paging_init();

Acked-by: Yinghai Lu <[email protected]>

BTW: current tip/master already make dma32_reserve_bootmem start from 512M
http://people.redhat.com/mingo/tip.git/readme.txt

YH

2008-07-14 07:16:06

by Yinghai Lu

[permalink] [raw]
Subject: Re: [PATCH] x86_64: reserve crashkernel bootmem before reserve dma32 bootmem

On Thu, Jul 10, 2008 at 10:32 AM, Yinghai Lu <[email protected]> wrote:
> On Thu, Jul 10, 2008 at 5:34 AM, Joe Jin <[email protected]> wrote:
>> Before reserve_crashkernel, dma32_reserve_bootmem would reserve 128M memory.
>> this cuased crashkernel end address must less than 64M or start address must
>> more than 192M except crashkernel memory reserved before dma32 memory reserved.
>>
>> This patch against 2.6.26-rc9
>>
>> Signed-off-by: Joe Jin <[email protected]>
>> ---
>> setup_64.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> --- linux-2.6.26-rc9/arch/x86/kernel/setup_64.c.orig 2008-07-10 16:34:12.000000000 +0800
>> +++ linux-2.6.26-rc9/arch/x86/kernel/setup_64.c 2008-07-10 16:35:00.000000000 +0800
>> @@ -444,8 +444,6 @@ void __init setup_arch(char **cmdline_p)
>> contig_initmem_init(0, end_pfn);
>> #endif
>>
>> - dma32_reserve_bootmem();
>> -
>> #ifdef CONFIG_ACPI_SLEEP
>> /*
>> * Reserve low memory region for sleep support.
>> @@ -486,6 +484,8 @@ void __init setup_arch(char **cmdline_p)
>> #endif
>> reserve_crashkernel();
>>
>> + dma32_reserve_bootmem();
>> +
>> reserve_ibft_region();
>>
>> paging_init();
>
> Acked-by: Yinghai Lu <[email protected]>
>

Ingo,

it seems you missed this patch..., it should get into 2.6.26..stable..too

YH

2008-07-14 07:28:19

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] x86_64: reserve crashkernel bootmem before reserve dma32 bootmem

* Yinghai Lu <[email protected]> wrote:

> On Thu, Jul 10, 2008 at 10:32 AM, Yinghai Lu <[email protected]> wrote:
> > On Thu, Jul 10, 2008 at 5:34 AM, Joe Jin <[email protected]> wrote:
> >> Before reserve_crashkernel, dma32_reserve_bootmem would reserve 128M memory.
> >> this cuased crashkernel end address must less than 64M or start address must
> >> more than 192M except crashkernel memory reserved before dma32 memory reserved.
> >>
> >> This patch against 2.6.26-rc9
> >>
> >> Signed-off-by: Joe Jin <[email protected]>
> >> ---
> >> setup_64.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> --- linux-2.6.26-rc9/arch/x86/kernel/setup_64.c.orig 2008-07-10 16:34:12.000000000 +0800
> >> +++ linux-2.6.26-rc9/arch/x86/kernel/setup_64.c 2008-07-10 16:35:00.000000000 +0800
> >> @@ -444,8 +444,6 @@ void __init setup_arch(char **cmdline_p)
> >> contig_initmem_init(0, end_pfn);
> >> #endif
> >>
> >> - dma32_reserve_bootmem();
> >> -
> >> #ifdef CONFIG_ACPI_SLEEP
> >> /*
> >> * Reserve low memory region for sleep support.
> >> @@ -486,6 +484,8 @@ void __init setup_arch(char **cmdline_p)
> >> #endif
> >> reserve_crashkernel();
> >>
> >> + dma32_reserve_bootmem();
> >> +
> >> reserve_ibft_region();
> >>
> >> paging_init();
> >
> > Acked-by: Yinghai Lu <[email protected]>
> >
>
> Ingo,
>
> it seems you missed this patch..., it should get into
> 2.6.26..stable..too

no, i didnt miss it - but it was too late for v2.6.26 and it was in a
common x86 codepath and the code in -tip there is very different. The
fix is a proper candidate for v2.6.26.1 though - stable team Cc:-ed.

Acked-by: Ingo Molnar <[email protected]>

Ingo

2008-07-14 12:08:55

by Greg KH

[permalink] [raw]
Subject: Re: [stable] [PATCH] x86_64: reserve crashkernel bootmem before reserve dma32 bootmem

On Mon, Jul 14, 2008 at 09:27:22AM +0200, Ingo Molnar wrote:
> * Yinghai Lu <[email protected]> wrote:
>
> > On Thu, Jul 10, 2008 at 10:32 AM, Yinghai Lu <[email protected]> wrote:
> > > On Thu, Jul 10, 2008 at 5:34 AM, Joe Jin <[email protected]> wrote:
> > >> Before reserve_crashkernel, dma32_reserve_bootmem would reserve 128M memory.
> > >> this cuased crashkernel end address must less than 64M or start address must
> > >> more than 192M except crashkernel memory reserved before dma32 memory reserved.
> > >>
> > >> This patch against 2.6.26-rc9
> > >>
> > >> Signed-off-by: Joe Jin <[email protected]>
> > >> ---
> > >> setup_64.c | 4 ++--
> > >> 1 file changed, 2 insertions(+), 2 deletions(-)
> > >>
> > >> --- linux-2.6.26-rc9/arch/x86/kernel/setup_64.c.orig 2008-07-10 16:34:12.000000000 +0800
> > >> +++ linux-2.6.26-rc9/arch/x86/kernel/setup_64.c 2008-07-10 16:35:00.000000000 +0800
> > >> @@ -444,8 +444,6 @@ void __init setup_arch(char **cmdline_p)
> > >> contig_initmem_init(0, end_pfn);
> > >> #endif
> > >>
> > >> - dma32_reserve_bootmem();
> > >> -
> > >> #ifdef CONFIG_ACPI_SLEEP
> > >> /*
> > >> * Reserve low memory region for sleep support.
> > >> @@ -486,6 +484,8 @@ void __init setup_arch(char **cmdline_p)
> > >> #endif
> > >> reserve_crashkernel();
> > >>
> > >> + dma32_reserve_bootmem();
> > >> +
> > >> reserve_ibft_region();
> > >>
> > >> paging_init();
> > >
> > > Acked-by: Yinghai Lu <[email protected]>
> > >
> >
> > Ingo,
> >
> > it seems you missed this patch..., it should get into
> > 2.6.26..stable..too
>
> no, i didnt miss it - but it was too late for v2.6.26 and it was in a
> common x86 codepath and the code in -tip there is very different. The
> fix is a proper candidate for v2.6.26.1 though - stable team Cc:-ed.
>
> Acked-by: Ingo Molnar <[email protected]>

Hm, Yinghai, can you resend this to [email protected] so I can actually
apply it? :)

thanks,

greg k-h