Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem()

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bwalle at suse

Jul 17, 2008, 3:15 PM

Post #1 of 4 (73 views)
Permalink
[PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem()

On a x86-64 machine (nothing special I could encounter) I had the problem that
crashkernel reservation with the usual "64M[at]16M" failed. While debugging that,
I encountered that dma32_reserve_bootmem() reserves a memory region which is in
that area.

Because dma32_reserve_bootmem() does not rely on a specific offset but
crashkernel does, it makes sense to move the crashkernel reservation up a bit.
I tested that patch and it works without problems. I don't see any negative
effects of that move, but maybe I oversaw something ...

While we strictly don't need that patch in 2.6.27 because we have the
automatic, dynamic offset detection, it makes sense to also include it here
because:

- it's easier to get it in -stable then,
- many people are still used to the 'crashkernel=...@16M' syntax,
- not everybody may be using a reloatable kernel.

Signed-off-by: Bernhard Walle <bwalle[at]suse.de>
---
arch/x86/kernel/setup.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 531b55b..16101c0 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -792,6 +792,12 @@ void __init setup_arch(char **cmdline_p)

initmem_init(0, max_pfn);

+ /*
+ * dma32_reserve_bootmem() allocates bootmem which may conflict
+ * with the crashkernel command line, so do that before
+ */
+ reserve_crashkernel();
+
#ifdef CONFIG_X86_64
dma32_reserve_bootmem();
#endif
@@ -808,7 +814,6 @@ void __init setup_arch(char **cmdline_p)
*/
find_smp_config();
#endif
- reserve_crashkernel();

reserve_ibft_region();

--
1.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


yhlu.kernel at gmail

Jul 17, 2008, 3:50 PM

Post #2 of 4 (62 views)
Permalink
Re: [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem() [In reply to]

On Thu, Jul 17, 2008 at 3:15 PM, Bernhard Walle <bwalle[at]suse.de> wrote:
> On a x86-64 machine (nothing special I could encounter) I had the problem that
> crashkernel reservation with the usual "64M[at]16M" failed. While debugging that,
> I encountered that dma32_reserve_bootmem() reserves a memory region which is in
> that area.
>
> Because dma32_reserve_bootmem() does not rely on a specific offset but
> crashkernel does, it makes sense to move the crashkernel reservation up a bit.
> I tested that patch and it works without problems. I don't see any negative
> effects of that move, but maybe I oversaw something ...
>
> While we strictly don't need that patch in 2.6.27 because we have the
> automatic, dynamic offset detection, it makes sense to also include it here
> because:
>
> - it's easier to get it in -stable then,
> - many people are still used to the 'crashkernel=...@16M' syntax,
> - not everybody may be using a reloatable kernel.
>
> Signed-off-by: Bernhard Walle <bwalle[at]suse.de>
> ---
> arch/x86/kernel/setup.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 531b55b..16101c0 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -792,6 +792,12 @@ void __init setup_arch(char **cmdline_p)
>
> initmem_init(0, max_pfn);
>
> + /*
> + * dma32_reserve_bootmem() allocates bootmem which may conflict
> + * with the crashkernel command line, so do that before
> + */
> + reserve_crashkernel();
> +
> #ifdef CONFIG_X86_64
> dma32_reserve_bootmem();
> #endif
> @@ -808,7 +814,6 @@ void __init setup_arch(char **cmdline_p)
> */
> find_smp_config();
> #endif
> - reserve_crashkernel();
>
> reserve_ibft_region();
>

Joe Jin already had another one to move dma32_reserve_bootmem later

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bwalle at suse

Jul 18, 2008, 2:52 AM

Post #3 of 4 (56 views)
Permalink
Re: [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem() [In reply to]

* Yinghai Lu [2008-07-17 15:50]:
>
> > + /*
> > + * dma32_reserve_bootmem() allocates bootmem which may conflict
> > + * with the crashkernel command line, so do that before
> > + */
> > + reserve_crashkernel();
> > +
> > #ifdef CONFIG_X86_64
> > dma32_reserve_bootmem();
> > #endif
> > @@ -808,7 +814,6 @@ void __init setup_arch(char **cmdline_p)
> > */
> > find_smp_config();
> > #endif
> > - reserve_crashkernel();
> >
> > reserve_ibft_region();
>
> Joe Jin already had another one to move dma32_reserve_bootmem later

Commit id? Current status?


Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


yhlu.kernel at gmail

Jul 18, 2008, 9:22 AM

Post #4 of 4 (52 views)
Permalink
Re: [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem() [In reply to]

On Fri, Jul 18, 2008 at 2:52 AM, Bernhard Walle <bwalle[at]suse.de> wrote:
> * Yinghai Lu [2008-07-17 15:50]:
>>
>> > + /*
>> > + * dma32_reserve_bootmem() allocates bootmem which may conflict
>> > + * with the crashkernel command line, so do that before
>> > + */
>> > + reserve_crashkernel();
>> > +
>> > #ifdef CONFIG_X86_64
>> > dma32_reserve_bootmem();
>> > #endif
>> > @@ -808,7 +814,6 @@ void __init setup_arch(char **cmdline_p)
>> > */
>> > find_smp_config();
>> > #endif
>> > - reserve_crashkernel();
>> >
>> > reserve_ibft_region();
>>
>> Joe Jin already had another one to move dma32_reserve_bootmem later
>
> Commit id? Current status?

it seems commit description from you is more good.
please create one version move dma32_reserve_boot_mem after
reserve_crashkernel and use your commit description.

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.