linux/arch/s390
Vasily Gorbik 5dbc4cb466 s390/setup: avoid using memblock_enforce_memory_limit
There is a difference in how architectures treat "mem=" option. For some
that is an amount of online memory, for s390 and x86 this is the limiting
max address. Some memblock api like memblock_enforce_memory_limit()
take limit argument and explicitly treat it as the size of online memory,
and use __find_max_addr to convert it to an actual max address. Current
s390 usage:

memblock_enforce_memory_limit(memblock_end_of_DRAM());

yields different results depending on presence of memory holes (offline
memory blocks in between online memory). If there are no memory holes
limit == max_addr in memblock_enforce_memory_limit() and it does trim
online memory and reserved memory regions. With memory holes present it
actually does nothing.

Since we already use memblock_remove() explicitly to trim online memory
regions to potential limit (think mem=, kdump, addressing limits, etc.)
drop the usage of memblock_enforce_memory_limit() altogether. Trimming
reserved regions should not be required, since we now use
memblock_set_current_limit() to limit allocations and any explicit memory
reservations above the limit is an actual problem we should not hide.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2021-11-16 12:29:18 +01:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390: support command lines longer than 896 bytes 2021-10-26 15:21:31 +02:00
configs s390: update defconfigs 2021-10-19 15:39:54 +02:00
crypto s390/archrandom: add parameter check for s390_arch_random_generate 2021-04-21 12:32:12 +02:00
hypfs s390: rename dma section to amode31 2021-08-05 14:10:53 +02:00
include s390 updates for the 5.16 merge window #2 2021-11-13 09:18:06 -08:00
kernel s390/setup: avoid using memblock_enforce_memory_limit 2021-11-16 12:29:18 +01:00
kvm s390 updates for the 5.16 merge window 2021-11-06 14:48:06 -07:00
lib s390 updates for the 5.16 merge window 2021-11-06 14:48:06 -07:00
mm Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
net s390: introduce nospec_uses_trampoline() 2021-10-26 15:21:29 +02:00
pci s390/pci: implement minimal PCI error recovery 2021-11-08 14:17:49 +01:00
purgatory s390: enable KCSAN 2021-07-30 17:09:23 +02:00
tools s390/disassembler: add instructions 2021-07-27 09:39:19 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390: make command line configurable 2021-10-26 15:21:31 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00