linux/arch/arm64/mm
Mark Rutland ea2cbee3bc arm64: mm: simplify memblock numa node extraction
We currently open-code extracting the NUMA node of a memblock region,
which requires an ifdef to cater for !CONFIG_NUMA builds where the
memblock_region::nid field does not exist.

The generic memblock_get_region_node helper is intended to cater for
this. For CONFIG_HAVE_MEMBLOCK_NODE_MAP, builds this returns reg->nid,
and for for !CONFIG_HAVE_MEMBLOCK_NODE_MAP builds this is a static
inline that returns 0. Note that for arm64,
CONFIG_HAVE_MEMBLOCK_NODE_MAP is selected iff CONFIG_NUMA is.

This patch makes use of memblock_get_region_node to simplify the arm64
code. At the same time, we can move the nid variable definition into the
loop, as this is the only place it is used.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-06-27 18:05:39 +01:00
..
cache.S arm64: Fold proc-macros.S into assembler.h 2016-04-28 12:05:45 +01:00
context.c arm64: Add cpu_panic_kernel helper 2016-04-15 18:06:06 +01:00
copypage.c arm64: Defer dcache flush in __cpu_copy_user_page 2015-12-17 11:07:13 +00:00
dma-mapping.c arm64: mm: only initialize swiotlb when necessary 2016-06-21 16:54:53 +01:00
dump.c arm64: mm: dump: make page table dumping reusable 2016-06-21 15:09:11 +01:00
extable.c arm64: switch to relative exception tables 2016-02-24 14:57:26 +00:00
fault.c arm64: kill ESR_LNX_EXEC 2016-06-21 17:07:48 +01:00
flush.c arm64: mm: allow preemption in copy_to_user_page 2016-03-24 16:32:54 +00:00
hugetlbpage.c Revert "arm64: hugetlb: partial revert of 66b3923a1a0f" 2016-05-31 11:00:09 +01:00
init.c arm64: mm: simplify memblock numa node extraction 2016-06-27 18:05:39 +01:00
ioremap.c arm64: add ioremap physical address information 2015-01-23 15:29:06 +00:00
kasan_init.c arm64: kasan: Fix zero shadow mapping overriding kernel image shadow 2016-03-11 11:03:35 +00:00
Makefile arm64, numa: Add NUMA support for arm64 platforms. 2016-04-15 18:06:09 +01:00
mm.h arm64: Move unflatten_device_tree() call earlier. 2016-04-15 18:06:08 +01:00
mmap.c arm64: mm: remove unnecessary EXPORT_SYMBOL_GPL 2016-05-05 09:49:38 +01:00
mmu.c arm64: Move unflatten_device_tree() call earlier. 2016-04-15 18:06:08 +01:00
numa.c arm64, numa: Add NUMA support for arm64 platforms. 2016-04-15 18:06:09 +01:00
pageattr.c arm64: Add support for ARCH_SUPPORTS_DEBUG_PAGEALLOC 2016-02-16 15:40:30 +00:00
pgd.c arm64: mm: move pgd_cache initialisation to pgtable_cache_init 2016-01-05 15:43:10 +00:00
proc.S arm64: Change cpu_resume() to enable mmu early then access sleep_sp by va 2016-04-28 12:05:46 +01:00