linux_dsm_epyc7002/arch/powerpc/mm
Aneesh Kumar K.V 5f5d6e40a0 powerpc/nvdimm: Update vmemmap_populated to check sub-section range
With commit: 7cc7867fb0 ("mm/devm_memremap_pages: enable sub-section remap")
pmem namespaces are remapped in 2M chunks. On architectures like ppc64 we
can map the memmap area using 16MB hugepage size and that can cover
a memory range of 16G.

While enabling new pmem namespaces, since memory is added in sub-section chunks,
before creating a new memmap mapping, kernel should check whether there is an
existing memmap mapping covering the new pmem namespace. Currently, this is
validated by checking whether the section covering the range is already
initialized or not. Considering there can be multiple namespaces in the same
section this can result in wrong validation. Update this to check for
sub-sections in the range. This is done by checking for all pfns in the range we
are mapping.

We could optimize this by checking only just one pfn in each sub-section. But
since this is not fast-path we keep this simple.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190917123851.22553-1-aneesh.kumar@linux.ibm.com
2019-10-28 21:54:15 +11:00
..
book3s32 powerpc/32s: get rid of CPU_FTR_601 feature 2019-08-28 23:19:33 +10:00
book3s64 powerpc/pkeys: remove unused pkey_allows_readwrite 2019-10-11 19:34:10 +11:00
kasan powerpc/mm: Fix an Oops in kasan_mmu_init() 2019-09-21 08:36:53 +10:00
nohash powerpc/mm: make ioremap_bot common to all 2019-08-27 13:03:34 +10:00
ptdump powerpc: use the generic dma coherent remap allocator 2019-08-28 23:19:34 +10:00
copro_fault.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
dma-noncoherent.c powerpc updates for 5.4 2019-09-20 11:48:06 -07:00
drmem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fault.c mm, kprobes: generalize and rename notify_page_fault() as kprobe_page_fault() 2019-07-16 19:23:22 -07:00
highmem.c powerpc/highmem: Change BUG_ON() to WARN_ON() 2019-04-20 22:02:11 +10:00
hugetlbpage.c mm: introduce compound_nr() 2019-09-24 15:54:08 -07:00
init_32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
init_64.c powerpc/nvdimm: Update vmemmap_populated to check sub-section range 2019-10-28 21:54:15 +11:00
init-common.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ioremap_32.c powerpc/mm: split out early ioremap path. 2019-08-27 13:03:35 +10:00
ioremap_64.c powerpc/mm: split out early ioremap path. 2019-08-27 13:03:35 +10:00
ioremap.c powerpc/mm: split out early ioremap path. 2019-08-27 13:03:35 +10:00
Makefile powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
mem.c powerpc: use the generic dma coherent remap allocator 2019-08-28 23:19:34 +10:00
mmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mmu_context.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mmu_decl.h powerpc/mm: make ioremap_bot common to all 2019-08-27 13:03:34 +10:00
numa.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
pgtable_32.c powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
pgtable_64.c powerpc/mm: Move ioremap functions out of pgtable_32/64.c 2019-08-27 13:03:35 +10:00
pgtable-frag.c mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
pgtable.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
slice.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00