diff mbox series

[v2,5/6] ARM: use "* SZ_1M" rather than "<< 20"

Message ID E1lmZT6-0005U2-8e@rmk-PC.armlinux.org.uk (mailing list archive)
State New, archived
Headers show
Series [1/4] ARM: change vmalloc_min to be unsigned long | expand

Commit Message

Russell King (Oracle) May 28, 2021, 10:11 a.m. UTC
Make the default vmalloc size clearer by using a more natural
multiplication by SZ_1M rather than a shift left by 20 bits.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 arch/arm/mm/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij May 28, 2021, 12:23 p.m. UTC | #1
On Fri, May 28, 2021 at 12:11 PM Russell King (Oracle)
<rmk+kernel@armlinux.org.uk> wrote:

> Make the default vmalloc size clearer by using a more natural
> multiplication by SZ_1M rather than a shift left by 20 bits.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Excellent, thanks!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Xu, Yanfei May 28, 2021, 1:17 p.m. UTC | #2
On 5/28/21 6:11 PM, Russell King (Oracle) wrote:
> Make the default vmalloc size clearer by using a more natural
> multiplication by SZ_1M rather than a shift left by 20 bits.
> 
> Signed-off-by: Russell King (Oracle)<rmk+kernel@armlinux.org.uk>

Reviewed-by: Yanfei Xu <yanfei.xu@windriver.com>

Regards,
Yanfei

> ---
diff mbox series

Patch

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 5ae11e6f2a58..d52647b6261c 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1123,7 +1123,7 @@  void __init debug_ll_io_init(void)
 }
 #endif
 
-static unsigned long __initdata vmalloc_size = 240 << 20;
+static unsigned long __initdata vmalloc_size = 240 * SZ_1M;
 
 /*
  * vmalloc=size forces the vmalloc area to be exactly 'size'