• David Hildenbrand's avatar
    s390/vmem: get rid of memory segment list · f05f62d0
    David Hildenbrand authored
    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 b2300b9e ("[S390] dcssblk: add >2G DCSSs support and stacked
    contiguous DCSSs support.")
    and was extended to cover all dcss segments in
    commit ca571146 ("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: default avatarDavid Hildenbrand <david@redhat.com>
    Message-Id: <20200625150029.45019-1-david@redhat.com>
    Reviewed-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
    Tested-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [DCSS]
    Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    f05f62d0
pgtable.h 49.1 KB