]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
nodemask: Don't opencode cycle_node()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 25 Jun 2019 14:56:35 +0000 (15:56 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Jun 2019 17:50:41 +0000 (18:50 +0100)
No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/numa.c
xen/common/page_alloc.c

index b3c9c12d7f53933b8efcc31db583444526b37211..7e1f5630126d037b554916d6a1c3ceb25fc36e7b 100644 (file)
@@ -192,9 +192,7 @@ void __init numa_init_array(void)
         if ( cpu_to_node[i] != NUMA_NO_NODE )
             continue;
         numa_set_node(i, rr);
-        rr = next_node(rr, node_online_map);
-        if ( rr == MAX_NUMNODES )
-            rr = first_node(node_online_map);
+        rr = cycle_node(rr, node_online_map);
     }
 }
 
index 7bbb44f7d1bc04a3931c4d3e237b2d6d8da96d8a..44a72d0b19acc2e6db36f80603875419e5a74813 100644 (file)
@@ -819,11 +819,8 @@ static struct page_info *get_free_buddy(unsigned int zone_lo,
     if ( node == NUMA_NO_NODE )
     {
         if ( d != NULL )
-        {
-            node = next_node(d->last_alloc_node, nodemask);
-            if ( node >= MAX_NUMNODES )
-                node = first_node(nodemask);
-        }
+            node = cycle_node(d->last_alloc_node, nodemask);
+
         if ( node >= MAX_NUMNODES )
             node = cpu_to_node(smp_processor_id());
     }