diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2021-01-24 20:04:08 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2021-02-09 15:57:05 +0100 |
commit | ea44de691ebad701c849b174dabd376ed6d7d1ae (patch) | |
tree | 5fc16e8d1034173180e04964a65a4b3c43a2b287 /arch/s390/kernel/vdso.c | |
parent | 96c0c7ae5266ec347041312ae22d947b5371e5b3 (diff) | |
download | linux-ea44de691ebad701c849b174dabd376ed6d7d1ae.tar.gz linux-ea44de691ebad701c849b174dabd376ed6d7d1ae.tar.bz2 linux-ea44de691ebad701c849b174dabd376ed6d7d1ae.zip |
s390/vdso: simplify vdso size calculation
The vdso is (and must) be page aligned and its size must also be
a multiple of PAGE_SIZE. Therefore no need to round upwards.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vdso.c')
-rw-r--r-- | arch/s390/kernel/vdso.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index 0bb287ae0f04..7075459aed51 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -170,8 +170,7 @@ static int __init vdso_init(void) int i; /* Calculate the size of the 64 bit vDSO */ - vdso64_pages = ((&vdso64_end - &vdso64_start - + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1; + vdso64_pages = ((&vdso64_end - &vdso64_start) >> PAGE_SHIFT) + 1; /* Make sure pages are in the correct state */ vdso64_pagelist = kcalloc(vdso64_pages + 1, sizeof(struct page *), |