summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorArun KS <arunks@codeaurora.org>2018-03-19 15:04:03 +0530
committerArun KS <arunks@codeaurora.org>2018-04-10 15:36:39 +0530
commit684b489a31e4b0190c3e68aad64351c37b07a987 (patch)
treef6c92f09d1dfa488d14c4082acc80f08f5d2222d /arch
parentef00227cce638b1ca8bd8c04d342a8688b7400e9 (diff)
arm64: Make section size configurable for hotplug
On arm64, currently section size is hard-coded to 1G. Make this configurable if hotplug is enabled to support more finer granularity for hotplug-able memory. Change-Id: I5327ead37069176f4ba34657133fab303fb15b82 Signed-off-by: Arun KS <arunks@codeaurora.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/Kconfig10
-rw-r--r--arch/arm64/include/asm/sparsemem.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 89e6a3df6dbf..3e3d509c3c03 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -203,6 +203,16 @@ config NEED_SG_DMA_LENGTH
config SMP
def_bool y
+config HOTPLUG_SIZE_BITS
+ int "Memory hotplug block size(28 => 256MB 30 => 1GB)"
+ depends on SPARSEMEM
+ default 30
+ help
+ Selects granularity of hotplug memory. Block
+ size for memory hotplug is represent as a power
+ of 2.
+ If unsure, stick with default value.
+
config ARM64_DMA_USE_IOMMU
bool
select ARM_HAS_SG_CHAIN
diff --git a/arch/arm64/include/asm/sparsemem.h b/arch/arm64/include/asm/sparsemem.h
index 74a9d301819f..81c69fe1adc0 100644
--- a/arch/arm64/include/asm/sparsemem.h
+++ b/arch/arm64/include/asm/sparsemem.h
@@ -18,7 +18,11 @@
#ifdef CONFIG_SPARSEMEM
#define MAX_PHYSMEM_BITS 48
+#ifndef CONFIG_MEMORY_HOTPLUG
#define SECTION_SIZE_BITS 30
+#else
+#define SECTION_SIZE_BITS CONFIG_HOTPLUG_SIZE_BITS
+#endif
#endif
#endif