Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1669649pxj; Wed, 19 May 2021 11:04:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEpI4qC9MEXSrzU9ojsd9SHOsZGiuE+KdppY9hKiH1kyVuGzG3vo2H7zI4dx3SXmFKnM5M X-Received: by 2002:a17:906:2b85:: with SMTP id m5mr400485ejg.141.1621447478469; Wed, 19 May 2021 11:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621447478; cv=none; d=google.com; s=arc-20160816; b=wbMLsR90uiyi/QRzK+URqRd9wcWEg/CGG3Op8btXhKwwRe4LvnS9jinuXadl0XRywP Om2pu8+gV563YcCTc4YQdsffAnd/dzPF7TZ21PqsexwQOj9PpIuJLWC2JN8Wf0ser/2c eP5v/3MY3aXg7oQt1rRuLKujIFeKpiO9aL9NupBCBGNx2ZNnXreyaN/eEQo689QhhKCD RDnunNJSPlhh4nxeVzQqpJGkT6Dw8r9pC6k41fh/HVQFLcSetlEoimLbD2PxeVUNy0eJ jmUtCt9zsA3iNaPiPDrY9WgK/gYjqdKQhOQhyFGLxp1qx7zq4cjGEHJqEEtETmNOqcF7 Ch5A== 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=tXsdohr9dsfiFfYjt4EoeiJaXMMYDvnBILSMVxKeA40=; b=1DcRoq+BYY1GwlExcFwn/JXjN3Dhin95n0DGCcuvQXLCDmaGkhKhLMKCj/yNuMKQFi /kIkx07uiUyZZzSlt+09to4b5jJkewd6XIB4mwiXdgfAZ+v0aAKMHDCcKeDGxExJ7mtx hwgzDM8LgJ0ZE5ZlpBGUlSQlv91/P7SLzd58XwZpH+SczjGdSTggZnCHOy9JHkwollMn 9p4hBviRUN6afAj9b0vTXn+zDFZhNbRCu9UDjbdUjnJzVairKbpiuqe4pp6UGLc4fJMc +zzgl2a6MY/XECnpfbBTKnaKKcNMxiogAQ8wgNDpCCqw1EWcKLjOY1im5WJPG8Vk5Th4 c7eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=ntVXk9vQ; 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 pw23si341756ejb.144.2021.05.19.11.04.06; Wed, 19 May 2021 11:04:38 -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=ntVXk9vQ; 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 S239350AbhERMRP (ORCPT + 99 others); Tue, 18 May 2021 08:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245356AbhERMRN (ORCPT ); Tue, 18 May 2021 08:17:13 -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 19A70C06175F for ; Tue, 18 May 2021 05:15:56 -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=tXsdohr9dsfiFfYjt4EoeiJaXMMYDvnBILSMVxKeA40=; b=ntVXk9vQhlEMBA3K6nALoQffR3 5o0C1XtG5gRZ/dgoOY1q2bKmOgyvvS+hffoJ3k8M/L9FhPE+y7BzQ/hl6uj7lic9+4/2m+/oJOKis pOxZyGYuNQzwqcbOGqLUvJSZRT2RxeKqr20yL2ouVjH7Z1EYn55qVRcaySvuj3uXdBDCHmOQwzgAe psEAd7bqPUssNGTf/22hUGiGWN63Mjy6wMN+9pAhrSwzLbMEr2phgd0eEDz9hDaI8uLFS1qZoFxWs LmcN7KboonS5jokv28+aGXmaIQy9nRuyc3uiPVdReRgYg1w10b/G2plrQ83mvv4KHVRjSnBAuLCRM qmtyXQSQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55066 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 1liyda-0004H8-Sc; Tue, 18 May 2021 13:15:50 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1liyda-0005B4-Kk; Tue, 18 May 2021 13:15:50 +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 3/4] 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: Tue, 18 May 2021 13:15:50 +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..457203b41ceb 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 - + (PAGE_OFFSET + PHYS_OFFSET + VMALLOC_OFFSET); /* * The first usable region must be PMD aligned. Mark its start -- 2.20.1