On Fri, 2007-03-02 at 09:03 -0800, David Rientjes wrote:
> Make sure we only reference 'cmdline' on CONFIG_NUMA_EMU.
> 
> Signed-off-by: David Rientjes <[EMAIL PROTECTED]>

Fixes the compile problem.

So does the moving 

char *cmdline __initdata;

out of CONFIG_NUMA_EMU. But I guess your is a cleaner fix.

Thanks,
Badari

> ---
>  arch/x86_64/mm/numa.c |   16 +++++++++++-----
>  1 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
> --- a/arch/x86_64/mm/numa.c
> +++ b/arch/x86_64/mm/numa.c
> @@ -524,22 +524,28 @@ void __init numa_initmem_init(unsigned long start_pfn, 
> unsigned long end_pfn)
>  { 
>       unsigned long start_addr = start_pfn << PAGE_SHIFT;
>       unsigned long end_addr = end_pfn << PAGE_SHIFT;
> +     int numa_fake = 0;
>       int i;
>  
> +#ifdef CONFIG_NUMA_EMU
> +     /* Determine if we have a numa=fake command line */
> +     if (cmdline != 0)
> +             numa_fake = 1;
> +#endif
> +
>  #ifdef CONFIG_ACPI_NUMA
> -     if (!numa_off && !cmdline && !acpi_scan_nodes(start_addr, end_addr))
> +     if (!numa_off && !numa_fake && !acpi_scan_nodes(start_addr, end_addr))
>               return;
>  #endif
>  
>  #ifdef CONFIG_K8_NUMA
> -     if (!numa_off && !k8_scan_nodes(start_addr, end_addr, cmdline != 0))
> -             if (cmdline == 0)
> +     if (!numa_off && !k8_scan_nodes(start_addr, end_addr, numa_fake))
> +             if (!numa_fake)
>                       return;
>  #endif
>  
>  #ifdef CONFIG_NUMA_EMU
> -     if (cmdline)
> -     {
> +     if (numa_fake) {
>               numa_emu = !numa_emulation(start_pfn, end_pfn);
>               if (numa_emu)
>                       return;

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

Reply via email to