From: Kefeng Wang
ohos inclusion
category: bugfix
issue: #I3ZXZF
CVE: NA
Reference: https://lore.kernel.org/linux-mm/20210417075946.181402-1-wangkefeng.wang@hua...
--------------------------------
Move HOLES_IN_ZONE into mm/Kconfig, select it if architecture needs
this feature.
Signed-off-by: Kefeng Wang
Reviewed-by: Jing Xiangfeng
Signed-off-by: Chen Jun
Signed-off-by: Yu Changchun
---
arch/arm64/Kconfig | 4 +---
arch/ia64/Kconfig | 5 +----
arch/mips/Kconfig | 3 ---
mm/Kconfig | 3 +++
4 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5e5cf3af6351..c505c3b5c97e 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -183,6 +183,7 @@ config ARM64
select HAVE_KPROBES
select HAVE_KRETPROBES
select HAVE_GENERIC_VDSO
+ select HOLES_IN_ZONE
select IOMMU_DMA if IOMMU_SUPPORT
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
@@ -1022,9 +1023,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK
def_bool y
depends on NUMA
-config HOLES_IN_ZONE
- def_bool y
-
source "kernel/Kconfig.hz"
config ARCH_SUPPORTS_DEBUG_PAGEALLOC
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 39b25a5a591b..cc0d4ce7a045 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -330,6 +330,7 @@ config NODES_SHIFT
config VIRTUAL_MEM_MAP
bool "Virtual mem map"
depends on !SPARSEMEM
+ select HOLES_IN_ZONE
default y
help
Say Y to compile the kernel with support for a virtual mem map.
@@ -338,10 +339,6 @@ config VIRTUAL_MEM_MAP
require the DISCONTIGMEM option for your machine. If you are
unsure, say Y.
-config HOLES_IN_ZONE
- bool
- default y if VIRTUAL_MEM_MAP
-
config HAVE_ARCH_EARLY_PFN_TO_NID
def_bool NUMA && SPARSEMEM
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 1917ccd39256..7e6b0168f9a5 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1193,9 +1193,6 @@ config HAVE_PLAT_MEMCPY
config ISA_DMA_API
bool
-config HOLES_IN_ZONE
- bool
-
config SYS_SUPPORTS_RELOCATABLE
bool
help
diff --git a/mm/Kconfig b/mm/Kconfig
index 390165ffbb0f..9d606d258ab4 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -129,6 +129,9 @@ config HAVE_FAST_GUP
depends on MMU
bool
+config HOLES_IN_ZONE
+ bool
+
# Don't discard allocated memory used to track "memory" and "reserved" memblocks
# after early boot, so it can still be used to test for validity of memory.
# Also, memblocks are updated with memory hot(un)plug.
--
2.22.0