aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/mm/numa.c
diff options
context:
space:
mode:
authorGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2016-10-30 06:43:43 -0400
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2016-10-30 06:43:43 -0400
commitbb41d2a51f0ed379cbe6b2f73271688784c40a1a (patch)
tree8c414a77b6977e23fdefad009f72f97ae9d33e14 /arch/arm64/mm/numa.c
parentdriver core: Add a wrapper around __device_release_driver() (diff)
parentLinux 4.9-rc3 (diff)
downloadlinux-bb41d2a51f0ed379cbe6b2f73271688784c40a1a.tar.gz
linux-bb41d2a51f0ed379cbe6b2f73271688784c40a1a.tar.bz2
linux-bb41d2a51f0ed379cbe6b2f73271688784c40a1a.zip
Merge 4.9-rc3 into driver-core-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64/mm/numa.c')
-rw-r--r--arch/arm64/mm/numa.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index 778a985c8a70..4b32168cf91a 100644
--- a/arch/arm64/mm/numa.c
+++ b/arch/arm64/mm/numa.c
@@ -147,7 +147,7 @@ static int __init early_cpu_to_node(int cpu)
static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
{
- return node_distance(from, to);
+ return node_distance(early_cpu_to_node(from), early_cpu_to_node(to));
}
static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size,
@@ -223,8 +223,11 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
void *nd;
int tnid;
- pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
- nid, start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
+ if (start_pfn < end_pfn)
+ pr_info("Initmem setup node %d [mem %#010Lx-%#010Lx]\n", nid,
+ start_pfn << PAGE_SHIFT, (end_pfn << PAGE_SHIFT) - 1);
+ else
+ pr_info("Initmem setup node %d [<memory-less node>]\n", nid);
nd_pa = memblock_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid);
nd = __va(nd_pa);