Skip to content

Commit af4459d

Browse files
Emil Medvetorvalds
authored andcommitted
arch/x86/mm/numa.c: use for_each_memblock()
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b46e14a commit af4459d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/x86/mm/numa.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
559559
int i, nid;
560560
nodemask_t numa_kernel_nodes = NODE_MASK_NONE;
561561
unsigned long start, end;
562-
struct memblock_type *type = &memblock.reserved;
562+
struct memblock_region *r;
563563

564564
/*
565565
* At this time, all memory regions reserved by memblock are
@@ -573,8 +573,8 @@ static void __init numa_clear_kernel_node_hotplug(void)
573573
}
574574

575575
/* Mark all kernel nodes. */
576-
for (i = 0; i < type->cnt; i++)
577-
node_set(type->regions[i].nid, numa_kernel_nodes);
576+
for_each_memblock(reserved, r)
577+
node_set(r->nid, numa_kernel_nodes);
578578

579579
/* Clear MEMBLOCK_HOTPLUG flag for memory in kernel nodes. */
580580
for (i = 0; i < numa_meminfo.nr_blks; i++) {

0 commit comments

Comments
 (0)