Re: Config NO_BOOTMEM breaks my amd64 box

From: Yinghai Lu
Date: Wed Mar 31 2010 - 18:17:42 EST


On 03/31/2010 03:13 PM, Ingo Molnar wrote:
>
> * Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>
>> --- linux-2.6.orig/arch/x86/mm/init_32.c
>> +++ linux-2.6/arch/x86/mm/init_32.c
>> @@ -875,7 +875,12 @@ void __init mem_init(void)
>> BUG_ON(!mem_map);
>> #endif
>> /* this will put all low memory onto the freelists */
>> +#if defined(CONFIG_NO_BOOTMEM) && defined(MAX_NUMNODES)
>> + /* In case some 32bit systems don't have RAM installed on node0 */
>> + totalram_pages += free_all_memory_core_early(MAX_NUMNODES);
>
> (Note: tab whitespace damage)
>
>> +#else
>> totalram_pages += free_all_bootmem();
>
> So we get into this branch if CONFIG_NO_BOOTMEM is enabled but MAX_NUMNODES is
> not defined? Doesnt look right.

yes.

free_all_bootmem() will call
free_all_memory_core_early(NODE_DATA(0)->node_id);

Thanks

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