linux_dsm_epyc7002/arch/s390
David Hildenbrand f05f62d042 s390/vmem: get rid of memory segment list
I can't come up with a satisfying reason why we still need the memory
segment list. We used to represent in the list:
- boot memory
- standby memory added via add_memory()
- loaded dcss segments

When loading/unloading dcss segments, we already track them in a
separate list and check for overlaps
(arch/s390/mm/extmem.c:segment_overlaps_others()) when loading segments.

The overlap check was introduced for some segments in
commit b2300b9efe ("[S390] dcssblk: add >2G DCSSs support and stacked
contiguous DCSSs support.")
and was extended to cover all dcss segments in
commit ca57114609 ("s390/extmem: remove code for 31 bit addressing
mode").

Although I doubt that overlaps with boot memory and standby memory
are relevant, let's reshuffle the checks in load_segment() to request
the resource first. This will bail out in case we have overlaps with
other resources (esp. boot memory and standby memory). The order
is now different compared to segment_unload() and segment_unload(), but
that should not matter.

This smells like a leftover from ancient times, let's get rid of it. We
can now convert vmem_remove_mapping() into a void function - everybody
ignored the return value already.

Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200625150029.45019-1-david@redhat.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Tested-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [DCSS]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2020-07-01 20:00:49 +02:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
configs s390 updates for the 5.7 merge window 2020-04-04 09:45:50 -07:00
crypto s390/crypto: use scnprintf() instead of snprintf() 2020-06-16 13:44:05 +02:00
hypfs fs_parse: fold fs_parameter_desc/fs_parameter_spec 2020-02-07 14:48:37 -05:00
include s390/vmem: get rid of memory segment list 2020-07-01 20:00:49 +02:00
kernel s390/stp: allow group and users to read stp sysfs files 2020-07-01 20:00:43 +02:00
kvm Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
lib s390 updates for the 5.8 merge window 2020-06-08 12:05:31 -07:00
mm s390/vmem: get rid of memory segment list 2020-07-01 20:00:49 +02:00
net s390/bpf: Use bcr 0,%0 as tail call nop filler 2020-06-02 21:04:04 +02:00
numa s390/mm: remove fake numa support 2020-02-27 16:02:21 +01:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
purgatory .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
scripts s390/build: use size command to perform empty .bss check 2019-08-08 14:36:53 +02:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild s390/kexec_file: Add purgatory 2018-04-16 09:10:22 +02:00
Kconfig s390/numa: let NODES_SHIFT depend on NEED_MULTIPLE_NODES 2020-06-16 13:44:05 +02:00
Kconfig.debug treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile s390: make 'install' not depend on vmlinux 2020-02-17 18:01:58 +01:00