linux_dsm_epyc7002/arch/arm64/mm
Catalin Marinas e25208f77c arm64: Fix mapping of memory banks not ending on a PMD_SIZE boundary
The map_mem() function limits the current memblock limit to PGDIR_SIZE
(the initial swapper_pg_dir mapping) to avoid create_mapping()
allocating memory from unmapped areas. However, if the first block is
within PGDIR_SIZE and not ending on a PMD_SIZE boundary, when 4K page
configuration is enabled, create_mapping() will try to allocate a pte
page. Such page may be returned by memblock_alloc() from the end of such
bank (or any subsequent bank within PGDIR_SIZE) which is not mapped yet.

The patch limits the current memblock limit to the aligned end of the
first bank and gradually increases it as more memory is mapped. It also
ensures that the start of the first bank is aligned to PMD_SIZE to avoid
pte page allocation for this mapping.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: "Leizhen (ThunderTown, Euler)" <thunder.leizhen@huawei.com>
Tested-by: "Leizhen (ThunderTown, Euler)" <thunder.leizhen@huawei.com>
2013-08-28 10:47:00 +01:00
..
cache.S arm64: mm: Fix operands of clz in __flush_dcache_all 2013-05-14 15:44:50 +01:00
context.c arm64: Process management 2012-09-17 13:41:58 +01:00
copypage.c arm64: MMU fault handling and page table management 2012-09-17 13:41:57 +01:00
dma-mapping.c arm64: Call swiotlb_init() instead of swiotlb_init_with_default_size() 2012-10-08 16:02:09 +01:00
extable.c arm64: MMU fault handling and page table management 2012-09-17 13:41:57 +01:00
fault.c arm64: mm: don't treat user cache maintenance faults as writes 2013-07-19 15:49:44 +01:00
flush.c arm64: Remove __flush_dcache_page() 2013-06-07 17:58:30 +01:00
hugetlbpage.c ARM64: mm: HugeTLB support. 2013-06-14 09:52:40 +01:00
init.c mm/microblaze: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:36 -07:00
ioremap.c arm64: Device specific operations 2012-09-17 13:42:04 +01:00
Makefile ARM64: mm: HugeTLB support. 2013-06-14 09:52:40 +01:00
mm.h arm64: Remove __flush_dcache_page() 2013-06-07 17:58:30 +01:00
mmap.c mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
mmu.c arm64: Fix mapping of memory banks not ending on a PMD_SIZE boundary 2013-08-28 10:47:00 +01:00
pgd.c arm64: MMU fault handling and page table management 2012-09-17 13:41:57 +01:00
proc-macros.S arm64: Assembly macros and definitions 2012-09-17 10:24:44 +01:00
proc.S arm64: debug: clear mdscr_el1 instead of taking the OS lock 2013-05-13 11:44:56 +01:00
tlb.S arm64: TLB maintenance functionality 2012-09-17 13:42:01 +01:00