Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp254283pxj; Fri, 28 May 2021 03:14:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAD/sdQJMq23LdC0etBQHgDqwT2MmPLa9rQpoiLt7yR5UM/KsqcuHex0imL24vVpF8hAYs X-Received: by 2002:a05:6402:b63:: with SMTP id cb3mr8997743edb.189.1622196863867; Fri, 28 May 2021 03:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622196863; cv=none; d=google.com; s=arc-20160816; b=dvwivhVHIcaLDscc5YlOa18eK0XjHAl/ZQLpndCW+/TVrqIag8xqCgzqe7ByJj/EBo Qc6AiGNs3xiADaPJrUrRDSKAWOA9YN3JAps52OGYWs6kWB1vPyLIhlK/A/Z/fHadGcy2 z6rjNzHi3sipEPFTA9bJ71BmLOxkqHK3S6XbjUVxzFwuxAz0d9JGeQE/hdj10ArMdWD7 OjTOnEdgkqHYYFRrooapLIccWm4W6ChhHwu/eowgRdndb5Mjl+wyZJEIyEajGJy2+zOB KFY6MSzf0RTodq9WHKxaPJRemZDrw44YrUML/o1i0G54gmOVe7t/fK80b87Hhu3/bTvK tIjw== 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=tDq4c1VX/bGIybAa5Df0z3WGi+MaHzacqg5gefl0XfI=; b=jpnETf/jpoA+auOMp/wbzRdkuWEkFGGVvhqCB77vIwCqf2jEyZaB2lMBSF8xcbRoyM MXoaiZudNHIi+m/LhSfwAi75YjUmsHrTBbkKzHrRfghGYk1t2V1BlwYqEgBOem49SYh0 8IUSlI9I20ZtpNjr9pHxu3AdYTJvaJksPKdUdfxgkwHuttH3Reao0FaRBR6r+q4m3kfw tDRvNZyGWUfgWvyoBw2Mj6l/wzNSXcbnc45edy57fV7UZKf4KqhoEqpM8vu7dePimxSF eahiDQ9GA+HcekP5ORdzRhqlBlBdBo7mwnbM5jCYiZ99te6sqJH4nx6DJOcdZ5gCcWDC 5EKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=zLLmaq0n; 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 c5si4803440ejs.175.2021.05.28.03.14.00; Fri, 28 May 2021 03:14:23 -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=zLLmaq0n; 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 S236528AbhE1KNZ (ORCPT + 99 others); Fri, 28 May 2021 06:13:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236519AbhE1KNW (ORCPT ); Fri, 28 May 2021 06:13:22 -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 8C256C061761 for ; Fri, 28 May 2021 03:11:47 -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=tDq4c1VX/bGIybAa5Df0z3WGi+MaHzacqg5gefl0XfI=; b=zLLmaq0ncVKobTElxR0hX8gx0M WpZEmAbmAfSiPWddEvd9XG6LdKEasu9aZ766BkIY/YggoESAwVk9njzrlcq8u9rGhYoxlS/CeIViP WIm7+Jw66iyhFbjHywmAPuwuKt0t/iKJm5T9x+lFwmBl61qeBZKpscM/I9YePE1+5dnB9W+Z8jZKy ei7roynrG6Yn3iYwQuFxPf9l6e+A0rpry0nwiLDxUUcEOVTbc70FpAr6GTlEr8gbWTTnAat+Ga6QG iCpR2mJPOMTyvDv5Od+3cJjsIy3egupRr29D44Ej0IGHj7iM6w9Xp7dQG8qiyvJdBAZ6RVRh5BDnd qLal7yQQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:57314 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 1lmZSw-0008Fq-8O; Fri, 28 May 2021 11:11:42 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lmZSw-0005TI-0s; Fri, 28 May 2021 11:11:42 +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 3/6] ARM: change vmalloc_min to vmalloc_start 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:42 +0100 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change the current vmalloc_min, which is supposed to be the lowest address of vmalloc space including the VMALLOC_OFFSET, to vmalloc_start which does not include VMALLOC_OFFSET. Signed-off-by: Russell King (Oracle) --- arch/arm/mm/mmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index d932c46a02e0..ed2846bdb1f4 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1123,8 +1123,7 @@ void __init debug_ll_io_init(void) } #endif -static unsigned long __initdata vmalloc_min = - VMALLOC_END - (240 << 20) - VMALLOC_OFFSET; +static unsigned long __initdata vmalloc_start = VMALLOC_END - (240 << 20); /* * vmalloc=size forces the vmalloc area to be exactly 'size' @@ -1142,14 +1141,14 @@ static int __init early_vmalloc(char *arg) vmalloc_reserve >> 20); } - vmalloc_max = VMALLOC_END - (PAGE_OFFSET + SZ_32M); + vmalloc_max = VMALLOC_END - (PAGE_OFFSET + SZ_32M + VMALLOC_OFFSET); if (vmalloc_reserve > vmalloc_max) { vmalloc_reserve = vmalloc_max; pr_warn("vmalloc area is too big, limiting to %luMB\n", vmalloc_reserve >> 20); } - vmalloc_min = VMALLOC_END - vmalloc_reserve; + vmalloc_start = VMALLOC_END - vmalloc_reserve; return 0; } early_param("vmalloc", early_vmalloc); @@ -1169,7 +1168,8 @@ 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_min - PAGE_OFFSET + PHYS_OFFSET; + vmalloc_limit = (u64)vmalloc_start - VMALLOC_OFFSET - + PAGE_OFFSET + PHYS_OFFSET; /* * The first usable region must be PMD aligned. Mark its start -- 2.20.1