summaryrefslogtreecommitdiff
path: root/xen/arch/x86/numa.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2016-08-11 13:36:42 +0200
committerJan Beulich <jbeulich@suse.com>2016-08-11 13:36:42 +0200
commit2c43ac6e9308768bcfb1568895738f6cd49582bf (patch)
tree45e5d5e89b362722c085b391601a24ce3108b3e1 /xen/arch/x86/numa.c
parentd0d6597d3d682f324b6a79e3278e6f5bb6bad153 (diff)
x86/NUMA: cleanup
- drop the only left CONFIG_NUMA conditional (this is always true) - drop struct node_data's node_id field (being always equal to the node_data[] array index used) - don't open code node_{start,end}_pfn() nor node_spanned_pages() except when used as lvalues (those could be converted too, but this seems a little awkward) - no longer open code pfn_to_paddr() in an expression being modified anyway - make dump less verbose by logging actual vs intended node IDs only when they don't match Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Diffstat (limited to 'xen/arch/x86/numa.c')
-rw-r--r--xen/arch/x86/numa.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index b66d123b12..6f4d438690 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -179,7 +179,6 @@ void __init setup_node_bootmem(nodeid_t nodeid, u64 start, u64 end)
start_pfn = start >> PAGE_SHIFT;
end_pfn = end >> PAGE_SHIFT;
- NODE_DATA(nodeid)->node_id = nodeid;
NODE_DATA(nodeid)->node_start_pfn = start_pfn;
NODE_DATA(nodeid)->node_spanned_pages = end_pfn - start_pfn;
@@ -390,16 +389,15 @@ static void dump_numa(unsigned char key)
for_each_online_node ( i )
{
- paddr_t pa = (paddr_t)(NODE_DATA(i)->node_start_pfn + 1)<< PAGE_SHIFT;
- printk("idx%d -> NODE%d start->%lu size->%lu free->%lu\n",
- i, NODE_DATA(i)->node_id,
- NODE_DATA(i)->node_start_pfn,
- NODE_DATA(i)->node_spanned_pages,
+ paddr_t pa = pfn_to_paddr(node_start_pfn(i) + 1);
+
+ printk("NODE%u start->%lu size->%lu free->%lu\n",
+ i, node_start_pfn(i), node_spanned_pages(i),
avail_node_heap_pages(i));
/* sanity check phys_to_nid() */
- printk("phys_to_nid(%"PRIpaddr") -> %d should be %d\n", pa,
- phys_to_nid(pa),
- NODE_DATA(i)->node_id);
+ if ( phys_to_nid(pa) != i )
+ printk("phys_to_nid(%"PRIpaddr") -> %d should be %u\n",
+ pa, phys_to_nid(pa), i);
}
j = cpumask_first(&cpu_online_map);