summaryrefslogtreecommitdiff
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@linux.ibm.com>2023-06-17 21:58:18 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2023-06-28 14:57:08 +0300
commit456be42aa713e7f83b467db66ceae779431c7d9d (patch)
treee04c32daa325721b9cd66e626c8ca7e98efff442 /drivers/s390/char
parent6a46676994607a1bde51cba71c1b0d373a555f45 (diff)
downloadlinux-456be42aa713e7f83b467db66ceae779431c7d9d.tar.xz
s390/mm: get rid of VMEM_MAX_PHYS macro
VMEM_MAX_PHYS is supposed to be the highest physical address that can be added to the identity mapping. It should match ident_map_size, which has the same meaning. However, unlike ident_map_size it is not adjusted against various limiting factors (see the comment to setup_ident_map_size() function). That renders all checks against VMEM_MAX_PHYS invalid. Further, VMEM_MAX_PHYS is currently set to vmemmap, which is an address in virtual memory space. However, it gets compared against physical addresses in various locations. That works, because both address spaces are the same on s390, but otherwise it is wrong. Instead of fixing VMEM_MAX_PHYS misuse and semantics just remove it. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/sclp_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index 3c87057436d5..594b34cf1c2b 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -392,10 +392,10 @@ static void __init add_memory_merged(u16 rn)
goto skip_add;
start = rn2addr(first_rn);
size = (unsigned long long) num * sclp.rzm;
- if (start >= VMEM_MAX_PHYS)
+ if (start >= ident_map_size)
goto skip_add;
- if (start + size > VMEM_MAX_PHYS)
- size = VMEM_MAX_PHYS - start;
+ if (start + size > ident_map_size)
+ size = ident_map_size - start;
if (start >= ident_map_size)
goto skip_add;
if (start + size > ident_map_size)