Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp255977pxj; Fri, 28 May 2021 03:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKRBXUFrmM9wX83j17xW7SPInvBNVsdzxhk4oW0zkIvmXZ6uE2h4R31tTdzT8ej2102KqT X-Received: by 2002:a05:6402:27c6:: with SMTP id c6mr9137347ede.200.1622197024009; Fri, 28 May 2021 03:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622197024; cv=none; d=google.com; s=arc-20160816; b=U8EnybJhLMn7xhAvYyQkLM5+AIaz59Xh6FfVRYRYDXqP0EBUHh9mfIjFgJHbn6rvLk fv01etG1ZhEj/l8XeGQL+5K9Gc//cx0yHMx0qRhFQn+p1tsm5MdjWK6hlfxI2ETF7jX5 Uhq212qrdO723h7lKUmFXZmSsZ9COVzqLdX9PEtv2eQ1GUxzSa7vUhaF2P4nFcEslHwZ hnnEpRYMojoHN1VJVyxGUWqTWQOVebwxK4pwpG2xiucw+QejeOh+lIJUu9h7CQhjNuxA A2K1KGxKHq0mz+2/6ySnVHY6Nx1nP9nnACGH/N3O1tY5oWcr17OuN/0NQ4sI3zJ8i1N6 PnEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:references :in-reply-to:dkim-signature; bh=ponfgRV4n6RGAITg3IztDQFPFc6M7q62uMq7kDRp4bw=; b=IzzzC4nIXJOahXZdCNpYFB9wUcqjHI22YW65ZZ4Yt1jo83mkxarnuhc/OQEOM290Su GPL7KN98b50abJ7YWGgU45VNYX/D4b/54K1JZLT6IBR90JdbMMfs5+XLMLfPFeh1+B0x NBYhBz1ten022IO6D5ETn/xNqqx2KirtnQumksy5488A06yMxHgs0KdDb6OODsVu//Zv QmhcCdhwo62eGShcXQyU1uiBFWpWO5XpGRchEiYZCkQR62emho54Jw1ic+Axkm6kmKyU vIAIk48dSriR12vXSM+isIOrzcieDzSrBdTRy9TKOWKcS+1+SHYt82tNQXoNMPnwKGIm rlXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=fMwB+VxK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb13si4439315ejc.145.2021.05.28.03.16.33; Fri, 28 May 2021 03:17:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=fMwB+VxK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236524AbhE1KNa (ORCPT + 99 others); Fri, 28 May 2021 06:13:30 -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