lkml.org 
[lkml]   [2010]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] ARM: memblock: convert reserve_crashkernel() to use memblock
On Sat, Nov 13, 2010 at 01:07:00PM +0000, Russell King - ARM Linux wrote:
> On Tue, Nov 09, 2010 at 11:06:13AM +0200, Mika Westerberg wrote:
> > static void __init reserve_crashkernel(void)
> > {
> > unsigned long long crash_size, crash_base;
> > - unsigned long long total_mem;
> > int ret;
> >
> > - total_mem = get_total_mem();
> > - ret = parse_crashkernel(boot_command_line, total_mem,
> > + /* this is necessary because of memblock_phys_mem_size() */
> > + memblock_analyze();
>
> I think you need to check with the memblock people whether its legal to
> call memblock_analyze() multiple times. What do other arches do for
> this?

At least powerpc and sh do it like the above.

> Secondly, when paging_init() returns, bootmem has been initialized, and
> memory taken from bootmem to feed the zone allocators. This memory is
> not registered back into memblock. Allocations from memblock after
> paging_init() has returned will lead to overlaps with bootmem, and
> therefore corruption.

Ok.

> So, this code is better off left as-is, rather than trying to convert it
> to what mistakenly appears "the latest thing".

Yeah, sounds like it wasn't such a good idea. Please ignore this
patch then.

Thanks,
MW


\
 
 \ /
  Last update: 2010-11-14 09:27    [W:0.082 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site