s390/vdso: simplify vdso size calculation
authorHeiko Carstens <hca@linux.ibm.com>
Sun, 24 Jan 2021 19:04:08 +0000 (20:04 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 9 Feb 2021 14:57:05 +0000 (15:57 +0100)
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>
arch/s390/kernel/vdso.c

index 0bb287a..7075459 100644 (file)
@@ -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 *),