linux/arch/arm64
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
..
boot arm64: dts: drop "arm,amba-bus" in favor of "simple-bus" part 2 2016-06-03 12:13:15 -07:00
configs arm64/kexec: Enable kexec in the arm64 defconfig 2016-06-27 16:31:25 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
include arm64/kexec: Add core kexec support 2016-06-27 16:31:25 +01:00
kernel arm64/kexec: Add pr_debug output 2016-06-27 16:31:26 +01:00
kvm arm64/kvm: use ESR_ELx_EC to extract EC 2016-06-21 17:07:38 +01:00
lib arm64: kasan: instrument user memory access API 2016-06-21 15:37:18 +01:00
mm arm64: mm: simplify memblock numa node extraction 2016-06-27 18:05:39 +01:00
net bpf: arm64: remove callee-save registers use for tmp registers 2016-05-17 14:03:33 -04:00
xen xen/arm: introduce HYPERVISOR_platform_op on arm and arm64 2015-12-21 14:40:56 +00:00
Kconfig arm64/kexec: Add core kexec support 2016-06-27 16:31:25 +01:00
Kconfig.debug arm64: enable CONFIG_SET_MODULE_RONX by default 2016-05-31 14:23:29 +01:00
Kconfig.platforms ARM: SoC 64-bit changes for v4.7 2016-05-18 12:43:08 -07:00
Makefile arm64: fix alignment when RANDOMIZE_TEXT_OFFSET is enabled 2016-06-03 10:57:18 +01:00