Messages in this thread | | | Date | Fri, 7 Mar 2008 09:40:48 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH] x86_64: tight online check in setup_per_cpu_areas |
| |
* Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> [PATCH] x86_64: tight online check in setup_per_cpu_areas > > when numa disabled got compile warning: > arch/x86/kernel/setup64.c: In function ???setup_per_cpu_areas???: > arch/x86/kernel/setup64.c:147: warning: the address of ???contig_page_data??? will always evaluate as ???true??? > > it seems we missed checking if the node is online before we try to > refer NODE_DATA. so fix it
thanks, applied.
> +#ifndef CONFIG_NEED_MULTIPLE_NODES > + ptr = alloc_bootmem_pages(size); > +#else > + int node = early_cpu_to_node(i); > > + if (!node_online(node) || !NODE_DATA(node)) > ptr = alloc_bootmem_pages(size); > + else > + ptr = alloc_bootmem_pages_node(NODE_DATA(node), size); > +#endif
i'm wondering, shouldnt there just be a single facility for this mode of allocation, instead of this #ifdef and branch maze?
Ingo
| |