Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Emil Medve and committed by
Linus Torvalds
af4459d3 b46e14ac

+3 -3
+3 -3
arch/x86/mm/numa.c
··· 559 559 int i, nid; 560 560 nodemask_t numa_kernel_nodes = NODE_MASK_NONE; 561 561 unsigned long start, end; 562 - struct memblock_type *type = &memblock.reserved; 562 + struct memblock_region *r; 563 563 564 564 /* 565 565 * At this time, all memory regions reserved by memblock are ··· 573 573 } 574 574 575 575 /* 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); 578 578 579 579 /* Clear MEMBLOCK_HOTPLUG flag for memory in kernel nodes. */ 580 580 for (i = 0; i < numa_meminfo.nr_blks; i++) {