Skip to content

Commit

Permalink
x86: fix NUMA emulation on 64-bit
Browse files Browse the repository at this point in the history
I found a small bug of NUMA emulation code for x86_64. (CONFIG_NUMA_EMU)
If machine is non-NUMA, find_node_by_addr() should return
NUMA_NO_NODE, but current implementation code returns existent maximum
NUMA node number + 1.
This is not existent NUMA node number.

However, this behaviour does not affect NUMA emulation fortunately, because
acpi_fake_nodes() that is caller of find_node_by_addr() gets pxm
(proximity domain) by node_to_pxm() from non-existent NUMA node number
that was returned by find_node_by_addr().
node_to_pxm() returns PXM_INVAL that means illegal or non-existent
NUMA node number.

Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Minoru Usui authored and Ingo Molnar committed Jan 30, 2008
1 parent 53391fa commit 9a1b62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/srat_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ static int __init find_node_by_addr(unsigned long addr)
break;
}
}
return i;
return ret;
}

/*
Expand Down

0 comments on commit 9a1b62f

Please sign in to comment.