linux-stable/arch/arm64
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
..
boot arm64: Add initial DTS for APM X-Gene Storm SOC and APM Mustang board 2013-06-20 17:03:59 +01:00
configs arm64: Enable APM X-Gene SOC family in the defconfig 2013-06-20 17:03:59 +01:00
include ARM64: include: asm: include "asm/types.h" in "pgtable-2level-types.h" and "pgtable-3level-types.h" 2013-08-22 11:44:41 +01:00
kernel arm64: move elf notes into readonly segment 2013-08-27 17:34:09 +01:00
kvm arm64: KVM: Kconfig integration 2013-07-04 14:40:26 +02:00
lib arm64: Treat the bitops index argument as an 'int' 2013-05-08 10:33:17 +01:00
mm arm64: Fix mapping of memory banks not ending on a PMD_SIZE boundary 2013-08-28 10:47:00 +01:00
xen xen/arm and xen/arm64: implement HYPERVISOR_tmem_op 2013-07-04 11:41:12 +00:00
Kconfig arm64: add support for kernel mode NEON 2013-08-20 12:12:26 +01:00
Kconfig.debug arm64: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS 2013-03-19 16:19:19 +00:00
Makefile arm64/Makefile: provide vdso_install target 2013-06-19 17:54:06 +01:00