arm64: mm: fix the count comments in compute_indices
authorDong Aisheng <aisheng.dong@nxp.com>
Tue, 18 May 2021 10:14:03 +0000 (18:14 +0800)
committerWill Deacon <will@kernel.org>
Tue, 15 Jun 2021 18:05:28 +0000 (19:05 +0100)
'count - 1' is confusing and not comply with the real code running.
'count' actually represents the extra entries required, no need minus 1.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210518101405.1048860-3-aisheng.dong@nxp.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/head.S

index 96873df..b70db34 100644 (file)
@@ -195,7 +195,7 @@ SYM_CODE_END(preserve_boot_args)
        and     \iend, \iend, \istart   // iend = (vend >> shift) & (ptrs - 1)
        mov     \istart, \ptrs
        mul     \istart, \istart, \count
-       add     \iend, \iend, \istart   // iend += (count - 1) * ptrs
+       add     \iend, \iend, \istart   // iend += count * ptrs
                                        // our entries span multiple tables
 
        lsr     \istart, \vstart, \shift