2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 07:34:06 +08:00
linux-next/arch
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
..
alpha Linux 4.3-rc6 2015-10-20 10:16:46 +02:00
arc Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 16:10:43 -08:00
arm uaccess: reimplement probe_kernel_address() using probe_kernel_read() 2015-11-05 19:34:48 -08:00
arm64 driver core update for 4.4-rc1 2015-11-04 21:50:37 -08:00
avr32 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 16:10:43 -08:00
blackfin Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
c6x irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
cris cris: Drop reference to get_cmos_time() 2015-11-02 20:03:05 +01:00
frv Linux 4.3-rc4 2015-10-06 17:10:28 +02:00
h8300 Linux 4.3-rc6 2015-10-20 10:16:46 +02:00
hexagon Linux 4.3-rc4 2015-10-06 17:10:28 +02:00
ia64 Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
m32r Linux 4.3-rc4 2015-10-06 17:10:28 +02:00
m68k Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-11-04 09:41:05 -08:00
metag Linux 4.3-rc4 2015-10-06 17:10:28 +02:00
microblaze Merge branch 'acpi-init' 2015-10-25 22:55:14 +01:00
mips Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
mn10300 Linux 4.3-rc4 2015-10-06 17:10:28 +02:00
nios2 Merge branch 'acpi-init' 2015-10-25 22:55:14 +01:00
openrisc dma-mapping: consolidate dma_set_mask 2015-09-10 13:29:01 -07:00
parisc Merge branch 'parisc-4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2015-11-04 11:30:22 -08:00
powerpc arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes 2015-11-05 19:34:48 -08:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-11-04 11:31:31 -08:00
score Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
sh Linux 4.3-rc6 2015-10-20 10:16:46 +02:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-11-04 09:41:05 -08:00
tile Linux 4.3-rc6 2015-10-20 10:16:46 +02:00
um um: Fix kernel mode fault condition 2015-10-19 22:53:37 +02:00
unicore32 Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
x86 Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
xtensa Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
.gitignore
Kconfig kexec: split kexec_load syscall from kexec core code 2015-09-10 13:29:01 -07:00