linux-stable/arch/powerpc
Raghavendra K T c118baf802 arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes
With the setup_nr_nodes(), we have already initialized
node_possible_map.  So it is safe to use for_each_node here.

There are many places in the kernel that use hardcoded 'for' loop with
nr_node_ids, because all other architectures have numa nodes populated
serially.  That should be reason we had maintained the same for
powerpc.

But, since sparse numa node ids possible on powerpc, we unnecessarily
allocate memory for non existent numa nodes.

For e.g., on a system with 0,1,16,17 as numa nodes nr_node_ids=18 and
we allocate memory for nodes 2-14.  This patch we allocate memory for
only existing numa nodes.

The patch is boot tested on a 4 node tuleta, confirming with printks
that it works as expected.

Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Anton Blanchard <anton@samba.org>
Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-05 19:34:48 -08:00
..
boot powerpc: dts: p1022si: Add fsl,wake-on-filer for eTSEC 2015-10-07 04:19:43 -07:00
configs powerpc/configs: Re-enable CONFIG_SCSI_DH 2015-09-29 20:34:03 +10:00
crypto crypto: powerpc/md5 - use md5 IV MD5_HX instead of their raw value 2015-05-18 12:20:20 +08:00
include powerpc fixes for 4.3 #4 2015-10-23 18:49:51 +09:00
kernel powerpc/dma: dma_set_coherent_mask() should not be GPL only 2015-10-28 14:20:50 +09:00
kvm powerpc: Revert "Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8" 2015-10-21 20:50:30 +11:00
lib powerpc32: memset: only use dcbz once cache is enabled 2015-09-17 10:36:53 +10:00
math-emu
mm arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes 2015-11-05 19:34:48 -08:00
net ebpf: migrate bpf_prog's flags to bitfield 2015-10-03 05:02:39 -07:00
oprofile powerpc: Remove mtmsrd(), use existing mtmsr() 2015-07-13 15:47:28 +10:00
perf perf/powerpc: Add support for PERF_SAMPLE_BRANCH_CALL 2015-10-20 10:30:54 +02:00
platforms Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 14:40:01 -08:00
sysdev uaccess: reimplement probe_kernel_address() using probe_kernel_read() 2015-11-05 19:34:48 -08:00
xmon powerpc/xmon: Drop the valid variable completely in dump_segments() 2015-08-12 15:05:47 +10:00
Kconfig kexec: split kexec_load syscall from kexec core code 2015-09-10 13:29:01 -07:00
Kconfig.debug powerpc: Make STRICT_MM_TYPECHECKS a config option 2015-05-11 19:53:59 +10:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-09-08 14:12:19 -07:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00