OpenCloudOS-Kernel/arch
Mike Rapoport a7d9f306ba arm64: drop pfn_valid_within() and simplify pfn_valid()
The arm64's version of pfn_valid() differs from the generic because of two
reasons:

* Parts of the memory map are freed during boot. This makes it necessary to
  verify that there is actual physical memory that corresponds to a pfn
  which is done by querying memblock.

* There are NOMAP memory regions. These regions are not mapped in the
  linear map and until the previous commit the struct pages representing
  these areas had default values.

As the consequence of absence of the special treatment of NOMAP regions in
the memory map it was necessary to use memblock_is_map_memory() in
pfn_valid() and to have pfn_valid_within() aliased to pfn_valid() so that
generic mm functionality would not treat a NOMAP page as a normal page.

Since the NOMAP regions are now marked as PageReserved(), pfn walkers and
the rest of core mm will treat them as unusable memory and thus
pfn_valid_within() is no longer required at all and can be disabled on
arm64.

pfn_valid() can be slightly simplified by replacing
memblock_is_map_memory() with memblock_is_memory().

[rppt@kernel.org: fix merge fix]
  Link: https://lkml.kernel.org/r/YJtoQhidtIJOhYsV@kernel.org

Link: https://lkml.kernel.org/r/20210511100550.28178-5-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.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>
2021-06-30 20:47:29 -07:00
..
alpha alpha: remove DISCONTIGMEM and NUMA 2021-06-29 10:53:55 -07:00
arc arc: remove support for DISCONTIGMEM 2021-06-29 10:53:55 -07:00
arm mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
arm64 arm64: drop pfn_valid_within() and simplify pfn_valid() 2021-06-30 20:47:29 -07:00
csky arch/csky patches for 5.13-rc1 2021-05-03 12:58:31 -07:00
h8300 h8300: remove unused variable 2021-06-29 10:53:52 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
ia64 mm/kconfig: move HOLES_IN_ZONE into mm 2021-06-30 20:47:28 -07:00
m68k m68k: remove support for DISCONTIGMEM 2021-06-29 10:53:55 -07:00
microblaze quota: Disable quotactl_path syscall 2021-05-17 14:39:56 +02:00
mips mm/kconfig: move HOLES_IN_ZONE into mm 2021-06-30 20:47:28 -07:00
nds32 arch, mm: remove stale mentions of DISCONIGMEM 2021-06-29 10:53:55 -07:00
nios2 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2021-05-02 09:14:01 -07:00
openrisc mm: update legacy flush_tlb_* to use vma 2021-06-29 10:53:52 -07:00
parisc quota: Disable quotactl_path syscall 2021-05-17 14:39:56 +02:00
powerpc powerpc/8xx: add support for huge pages on VMAP and VMALLOC 2021-06-30 20:47:26 -07:00
riscv mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
s390 mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
sh mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
sparc mm/hugetlb: change parameters of arch_make_huge_pte() 2021-06-30 20:47:26 -07:00
um Merge branch 'akpm' (patches from Andrew) 2021-05-07 00:34:51 -07:00
x86 mm: sparsemem: use huge PMD mapping for vmemmap pages 2021-06-30 20:47:26 -07:00
xtensa arch, mm: remove stale mentions of DISCONIGMEM 2021-06-29 10:53:55 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Add Landlock, a new LSM from Mickaël Salaün <mic@linux.microsoft.com> 2021-05-01 18:50:44 -07:00