kernel-ark/arch/powerpc/mm
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
..
40x_mmu.c
44x_mmu.c
copro_fault.c cxl: Move include file cxl.h -> cxl-base.h 2015-06-03 13:27:19 +10:00
dma-noncoherent.c powerpc: Fix compile errors with STRICT_MM_TYPECHECKS enabled 2015-04-10 20:02:47 +10:00
fault.c powerpc: Add plain English description for alignment exception oopses 2015-07-06 20:24:35 +10:00
fsl_booke_mmu.c powerpc/fsl: Force coherent memory on e500mc derivatives 2015-08-07 23:00:01 -05:00
hash_low_32.S
hash_low_64.S powerpc/mm: Drop CONFIG_PPC_HAS_HASH_64K 2015-08-18 19:32:10 +10:00
hash_native_64.c powerpc: Fix checkstop in native_hpte_clear() with lockdep 2015-10-09 08:01:38 +11:00
hash_utils_64.c powerpc/mm: Drop CONFIG_PPC_HAS_HASH_64K 2015-08-18 19:32:10 +10:00
highmem.c sched/preempt, mm/kmap: Explicitly disable/enable preemption in kmap_atomic_* 2015-05-19 08:39:14 +02:00
hugepage-hash64.c powerpc/mm: Recompute hash value after a failed update 2015-09-16 22:06:03 +10:00
hugetlbpage-book3e.c
hugetlbpage-hash64.c powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
hugetlbpage.c powerpc/cell: Drop support for 64K local store on 4K kernels 2015-08-18 19:29:49 +10:00
icswx_pid.c
icswx.c
icswx.h
init_32.c
init_64.c powerpc/mm: Free string after creating kmem cache 2015-03-26 15:23:17 +11:00
Makefile powerpc/mmu: Add userspace-to-physical addresses translation cache 2015-06-11 15:16:54 +10:00
mem.c libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
mmap.c mm: expose arch_mmap_rnd when available 2015-04-14 16:49:05 -07:00
mmu_context_hash32.c
mmu_context_hash64.c powerpc/mmu: Add userspace-to-physical addresses translation cache 2015-06-11 15:16:54 +10:00
mmu_context_iommu.c powerpc/mmu: Add userspace-to-physical addresses translation cache 2015-06-11 15:16:54 +10:00
mmu_context_nohash.c powerpc/8xx: reduce pressure on TLB due to context switches 2015-01-29 21:51:06 -06:00
mmu_decl.h powerpc/mm: Change setbat() to take a pgprot_t rather than flags 2015-04-07 17:15:13 +10:00
numa.c arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes 2015-11-05 19:34:48 -08:00
pgtable_32.c powerpc: Replace mem_init_done with slab_is_available() 2015-04-10 20:02:48 +10:00
pgtable_64.c powerpc/booke64: Move mb() to __set_pte_at() with kernel-addr test 2015-08-07 23:00:01 -05:00
pgtable.c mm: convert p[te|md]_numa users to p[te|md]_protnone_numa 2015-02-12 18:54:08 -08:00
ppc_mmu_32.c powerpc/mm: Change setbat() to take a pgprot_t rather than flags 2015-04-07 17:15:13 +10:00
slb_low.S
slb.c powerpc/slb: Add documentation on runtime patching of SLB encoding 2015-08-12 15:04:52 +10:00
slice.c powerpc: Remove some unused functions 2015-01-28 15:00:24 +11:00
subpage-prot.c arch/powerpc/mm/subpage-prot.c: use walk->vma and walk_page_vma() 2015-02-11 17:06:06 -08:00
tlb_hash32.c
tlb_hash64.c powerpc: Fix compile errors with STRICT_MM_TYPECHECKS enabled 2015-04-10 20:02:47 +10:00
tlb_low_64e.S powerpc/e6500: hw tablewalk: optimize a bit for tcd lock acquiring codes 2015-08-17 18:53:47 -05:00
tlb_nohash_low.S
tlb_nohash.c sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
vphn.c powerpc/vphn: parsing code rewrite 2015-03-18 10:48:59 +11:00
vphn.h powerpc/vphn: parsing code rewrite 2015-03-18 10:48:59 +11:00