lkml.org 
[lkml]   [2007]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch -mm] x86_64: fake numa cmdline flag fix
    Make sure we only reference 'cmdline' on CONFIG_NUMA_EMU.

    Signed-off-by: David Rientjes <rientjes@google.com>
    ---
    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 majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-03-02 18:07    [W:0.024 / U:60.780 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site