From 7b4c2e0d5641b967a2a27037c8fa5d8191043044 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 18 Apr 2012 19:04:17 +0200 Subject: [PATCH] --- yaml --- r: 304991 b: refs/heads/master c: 94c0dd3278dd3eae52eabf0fb77d472d0dd3e373 h: refs/heads/master i: 304989: de9739dcf25da821c9b88146185f9b408a5b1155 304987: 5af2ec7334f67f651de491a635e6efa12b6c435b 304983: 400cc993b71f9e546b5442f50afbe9581cd1d471 304975: 99b587901dce688a17ddbb1fc5bc6ce4ff0bfa52 304959: 5ad6f8bd4717a330cf892156f19ea1c2d8262bae v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/numa_emulation.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 636681247d01..a599afb16c19 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 19209bbb8612004bc20a1f70ff12926f99fe2643 +refs/heads/master: 94c0dd3278dd3eae52eabf0fb77d472d0dd3e373 diff --git a/trunk/arch/x86/mm/numa_emulation.c b/trunk/arch/x86/mm/numa_emulation.c index 53489ff6bf82..871dd8868170 100644 --- a/trunk/arch/x86/mm/numa_emulation.c +++ b/trunk/arch/x86/mm/numa_emulation.c @@ -339,9 +339,11 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt) } else { unsigned long n; - n = simple_strtoul(emu_cmdline, NULL, 0); + n = simple_strtoul(emu_cmdline, &emu_cmdline, 0); ret = split_nodes_interleave(&ei, &pi, 0, max_addr, n); } + if (*emu_cmdline == ':') + emu_cmdline++; if (ret < 0) goto no_emu; @@ -418,7 +420,9 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt) int physj = emu_nid_to_phys[j]; int dist; - if (physi >= numa_dist_cnt || physj >= numa_dist_cnt) + if (get_option(&emu_cmdline, &dist) == 2) + ; + else if (physi >= numa_dist_cnt || physj >= numa_dist_cnt) dist = physi == physj ? LOCAL_DISTANCE : REMOTE_DISTANCE; else