From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DCB0C4708C for ; Fri, 28 May 2021 10:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0889761378 for ; Fri, 28 May 2021 10:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236076AbhE1KNb (ORCPT ); Fri, 28 May 2021 06:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236521AbhE1KN1 (ORCPT ); Fri, 28 May 2021 06:13:27 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2E5BC06174A for ; Fri, 28 May 2021 03:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ponfgRV4n6RGAITg3IztDQFPFc6M7q62uMq7kDRp4bw=; b=fMwB+VxKd5obpQ+OpPP1IeG0VF lys+pt+BzV4oyhqVdlpi5ghFh93i6yThDl5FvNCLVgnVpTombZQyuTjvFetkq9rfgRK7NUX233Pag /CXv1Ulbzks4/0JNk8jLfjofktOi/BK6t0JGzzBIE2+9NwK6C89VhJrKcXoqQwukT+9EQzdpT5wJg EqrmW1kwig/nFxENb6Jbiluxes0NzDwao4YdRPpO6BXv+qN59+g4cmKPuNdcQ5bYDCNKVLdWJDRYR V58VglX0wKWWxxQd5tx3dw4ooL6s6I3eKcH3rTm7qWYtMw53HKGNFm4lbIdyim3dXI1qeuqkUpX42 F/31942A==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:57316 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmZT1-0008GE-By; Fri, 28 May 2021 11:11:47 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lmZT1-0005Te-4i; Fri, 28 May 2021 11:11:47 +0100 In-Reply-To: <20210518120633.GW12395@shell.armlinux.org.uk> References: <20210518120633.GW12395@shell.armlinux.org.uk> From: "Russell King (Oracle)" To: Yanfei Xu Cc: rppt@kernel.org, ardb@kernel.org, linus.walleij@linaro.org, akpm@linux-foundation.org, carver4lio@163.com, tiantao6@hisilicon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/6] ARM: change vmalloc_start to vmalloc_size MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Fri, 28 May 2021 11:11:47 +0100 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rather than storing the start of vmalloc space, store the size, and move the calculation into adjust_lowmem_limit(). We now have one single place where this calculation takes place. Signed-off-by: Russell King (Oracle) --- arch/arm/mm/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index ed2846bdb1f4..5ae11e6f2a58 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_start = VMALLOC_END - (240 << 20); +static unsigned long __initdata vmalloc_size = 240 << 20; /* * vmalloc=size forces the vmalloc area to be exactly 'size' @@ -1148,7 +1148,7 @@ static int __init early_vmalloc(char *arg) vmalloc_reserve >> 20); } - vmalloc_start = VMALLOC_END - vmalloc_reserve; + vmalloc_size = vmalloc_reserve; return 0; } early_param("vmalloc", early_vmalloc); @@ -1168,7 +1168,7 @@ void __init adjust_lowmem_bounds(void) * and may itself be outside the valid range for which phys_addr_t * and therefore __pa() is defined. */ - vmalloc_limit = (u64)vmalloc_start - VMALLOC_OFFSET - + vmalloc_limit = (u64)VMALLOC_END - vmalloc_size - VMALLOC_OFFSET - PAGE_OFFSET + PHYS_OFFSET; /* -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5E28C47087 for ; Fri, 28 May 2021 11:02:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FE2F613B5 for ; Fri, 28 May 2021 11:02:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FE2F613B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:MIME-Version:Subject:Cc :To:From:References:In-Reply-To:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RcOU4YCnpltDryOiY05XssLIjFGt/gkk5OY3ETJx4y0=; b=eqN0TjBl+AtwXx tws4xp3x96Smy1oOuM6fEWDUIsk6zSdSyNSc7pLG86ZIe074c6yMhi/590sHWsUVtKq0eYkB0Yedz Kam0LGMTTQmogfRkgUDAWT5oIBWxtPfs2FrH51MfA3/95L0Asvhw9g4YonuYY8VivZsRa7cUprM9q Y9iIGygMmSGo4Pvn7zaMzWOFUi7t97anyF08hueqr0wTogedna+PesTVzdF5vRrmZaQgP79uBm8Kh YVmwEEXJXLy7fZEzba1L+cfHUwOYD33fywrFJuJlrKN7qucWjYDMiKAP801bMpwf9WyZhk4BnXSpJ /SsHfMk2n3ZiRFLeqfRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmaD7-00Ecqw-NK; Fri, 28 May 2021 10:59:28 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmZT4-00EGrd-5B for linux-arm-kernel@lists.infradead.org; Fri, 28 May 2021 10:11:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ponfgRV4n6RGAITg3IztDQFPFc6M7q62uMq7kDRp4bw=; b=fMwB+VxKd5obpQ+OpPP1IeG0VF lys+pt+BzV4oyhqVdlpi5ghFh93i6yThDl5FvNCLVgnVpTombZQyuTjvFetkq9rfgRK7NUX233Pag /CXv1Ulbzks4/0JNk8jLfjofktOi/BK6t0JGzzBIE2+9NwK6C89VhJrKcXoqQwukT+9EQzdpT5wJg EqrmW1kwig/nFxENb6Jbiluxes0NzDwao4YdRPpO6BXv+qN59+g4cmKPuNdcQ5bYDCNKVLdWJDRYR V58VglX0wKWWxxQd5tx3dw4ooL6s6I3eKcH3rTm7qWYtMw53HKGNFm4lbIdyim3dXI1qeuqkUpX42 F/31942A==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:57316 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmZT1-0008GE-By; Fri, 28 May 2021 11:11:47 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lmZT1-0005Te-4i; Fri, 28 May 2021 11:11:47 +0100 In-Reply-To: <20210518120633.GW12395@shell.armlinux.org.uk> References: <20210518120633.GW12395@shell.armlinux.org.uk> From: "Russell King (Oracle)" To: Yanfei Xu Cc: rppt@kernel.org, ardb@kernel.org, linus.walleij@linaro.org, akpm@linux-foundation.org, carver4lio@163.com, tiantao6@hisilicon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/6] ARM: change vmalloc_start to vmalloc_size MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Fri, 28 May 2021 11:11:47 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210528_031150_266787_32CF4D83 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rather than storing the start of vmalloc space, store the size, and move the calculation into adjust_lowmem_limit(). We now have one single place where this calculation takes place. Signed-off-by: Russell King (Oracle) --- arch/arm/mm/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index ed2846bdb1f4..5ae11e6f2a58 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_start = VMALLOC_END - (240 << 20); +static unsigned long __initdata vmalloc_size = 240 << 20; /* * vmalloc=size forces the vmalloc area to be exactly 'size' @@ -1148,7 +1148,7 @@ static int __init early_vmalloc(char *arg) vmalloc_reserve >> 20); } - vmalloc_start = VMALLOC_END - vmalloc_reserve; + vmalloc_size = vmalloc_reserve; return 0; } early_param("vmalloc", early_vmalloc); @@ -1168,7 +1168,7 @@ void __init adjust_lowmem_bounds(void) * and may itself be outside the valid range for which phys_addr_t * and therefore __pa() is defined. */ - vmalloc_limit = (u64)vmalloc_start - VMALLOC_OFFSET - + vmalloc_limit = (u64)VMALLOC_END - vmalloc_size - VMALLOC_OFFSET - PAGE_OFFSET + PHYS_OFFSET; /* -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel