linux-stable/arch/arm/mm
Mike Rapoport 4f5b0c1789 arm, arm64: move free_unused_memmap() to generic mm
ARM and ARM64 free unused parts of the memory map just before the
initialization of the page allocator. To allow holes in the memory map both
architectures overload pfn_valid() and define HAVE_ARCH_PFN_VALID.

Allowing holes in the memory map for FLATMEM may be useful for small
machines, such as ARC and m68k and will enable those architectures to cease
using DISCONTIGMEM and still support more than one memory bank.

Move the functions that free unused memory map to generic mm and enable
them in case HAVE_ARCH_PFN_VALID=y.

Link: https://lkml.kernel.org/r/20201101170454.9567-10-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Meelis Roos <mroos@linux.ee>
Cc: Michael Schmitz <schmitzmic@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-12-15 12:13:42 -08:00
..
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S
abort-ev7.S
abort-lv4t.S
abort-macro.S
abort-nommu.S
alignment.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cache-b15-rac.c ARM: mm: Remove virtual address print from B15 RAC driver 2020-05-06 11:12:12 -07:00
cache-fa.S
cache-feroceon-l2.c
cache-l2x0-pmu.c
cache-l2x0.c ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values 2020-09-15 14:35:53 +01:00
cache-nop.S
cache-tauros2.c
cache-tauros3.h
cache-uniphier.c
cache-v4.S
cache-v4wb.S
cache-v4wt.S
cache-v6.S
cache-v7.S sched/rt, ARM: Use CONFIG_PREEMPTION 2019-12-08 14:37:32 +01:00
cache-v7m.S sched/rt, ARM: Use CONFIG_PREEMPTION 2019-12-08 14:37:32 +01:00
cache-xsc3l2.c
context.c
copypage-fa.c
copypage-feroceon.c
copypage-v4mc.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
copypage-v4wb.c
copypage-v4wt.c
copypage-v6.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
copypage-xsc3.c
copypage-xscale.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
dma-mapping-nommu.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
dma-mapping.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
dma.h
dump.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
extable.c
fault-armv.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
fault.c mm/arm: use general page fault accounting 2020-08-12 10:58:03 -07:00
fault.h ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes 2019-08-23 11:39:34 +01:00
flush.c mm: introduce compound_nr() 2019-09-24 15:54:08 -07:00
fsr-2level.c
fsr-3level.c
highmem.c mm: pgtable: add shortcuts for accessing kernel PMD and PTE 2020-06-09 09:39:13 -07:00
hugetlbpage.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
idmap.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
init.c arm, arm64: move free_unused_memmap() to generic mm 2020-12-15 12:13:42 -08:00
iomap.c ARM: 8923/1: mm: include <asm/vga.h> for vga_base 2019-10-31 16:58:54 +00:00
ioremap.c mm: pgtable: add shortcuts for accessing kernel PMD and PTE 2020-06-09 09:39:13 -07:00
Kconfig ARM: SoC platform updates 2019-12-05 11:38:40 -08:00
l2c-common.c
l2c-l2x0-resume.S
Makefile
mm.h mm: pgtable: add shortcuts for accessing kernel PMD and PTE 2020-06-09 09:39:13 -07:00
mmap.c arm: use generic mmap top-down layout and brk randomization 2019-09-24 15:54:12 -07:00
mmu.c mm: remove duplicate include statement in mmu.c 2020-10-18 09:27:10 -07:00
nommu.c arm: remove ioremap_cached 2019-11-11 17:19:40 +01:00
pabort-legacy.S
pabort-v6.S
pabort-v7.S
pageattr.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pgd.c arm: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
physaddr.c
pmsa-v7.c arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
pmsa-v8.c arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
proc-arm7tdmi.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm9tdmi.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm720.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm740.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm920.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm922.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm925.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm926.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm940.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm946.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm1020.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm1020e.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm1022.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-arm1026.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-fa526.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-feroceon.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-macros.S ARM: 8982/1: mm: Simplify act_mm macro 2020-07-21 16:33:36 +01:00
proc-mohawk.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-sa110.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-sa1100.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-syms.c
proc-v6.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-v7-2level.S
proc-v7-3level.S
proc-v7-bugs.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
proc-v7.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-v7m.S ARM: 8933/1: replace Sun/Solaris style flag on section directive 2019-11-15 22:21:19 +00:00
proc-xsc3.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
proc-xscale.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
ptdump_debugfs.c
pv-fixup-asm.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
tcm.h
tlb-fa.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S
tlb-v7.S