linux-stable/arch/arc/mm
Eugeniy Paltsev 2f0d2f3ace ARC: adjust memblock_reserve of kernel memory
commit a3010a0465 upstream.

In setup_arch_memory we reserve the memory area wherein the kernel
is located. Current implementation may reserve more memory than
it actually required in case of CONFIG_LINUX_LINK_BASE is not
equal to CONFIG_LINUX_RAM_BASE. This happens because we calculate
start of the reserved region relatively to the CONFIG_LINUX_RAM_BASE
and end of the region relatively to the CONFIG_LINUX_RAM_BASE.

For example in case of HSDK board we wasted 256MiB of physical memory:
------------------->8------------------------------
Memory: 770416K/1048576K available (5496K kernel code,
    240K rwdata, 1064K rodata, 2200K init, 275K bss,
    278160K reserved, 0K cma-reserved)
------------------->8------------------------------

Fix that.

Fixes: 9ed68785f7 ("ARC: mm: Decouple RAM base address from kernel link addr")
Cc: stable@vger.kernel.org	#4.14+
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-31 08:14:35 +01:00
..
cache.c ARC: IOC: panic if both IOC and ZONE_HIGHMEM enabled 2018-09-04 13:21:37 -07:00
dma.c ARC: don't check for HIGHMEM pages in arch_dma_alloc 2018-09-04 13:21:38 -07:00
extable.c ARC: uaccess: enable INLINE_COPY_{TO,FROM}_USER ... 2017-03-30 00:07:48 -04:00
fault.c mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
highmem.c ARC: export kmap 2016-08-19 10:45:29 -07:00
init.c ARC: adjust memblock_reserve of kernel memory 2019-01-31 08:14:35 +01:00
ioremap.c ARCv2: Support dynamic peripheral address space in HS38 rel 3.0 cores 2016-09-30 14:48:17 -07:00
Makefile ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
mmap.c mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
tlb.c ARCv2: Accomodate HS48 MMUv5 by relaxing MMU ver checking 2017-11-06 11:31:21 -08:00
tlbex.S ARC: [plat-eznps] Fix TLB Errata 2017-08-28 15:17:36 -07:00