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 BB594C433ED for ; Tue, 18 May 2021 12:16:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 949DB611CC for ; Tue, 18 May 2021 12:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348783AbhERMRW (ORCPT ); Tue, 18 May 2021 08:17:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245743AbhERMRS (ORCPT ); Tue, 18 May 2021 08:17:18 -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 BD01EC06175F for ; Tue, 18 May 2021 05:16:00 -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=c2+F1zL32ImCnk7eIDJcr6c8d1xl1EJQ2Q5jtE+xhe8=; b=qqVcKxdipNAJBlgI6I2/5CndBt ufDfSi768Za5cfaBlc9LPPE0WmqrzTSaReiLT9mgPbEa0SxyGTOSyaNg3EDN9U0W+hfqGxoBDsGsz Bd4aK+9sazpX9HkKOb/UV8wUb3Z1Z0eydI9Ow9es4C44r3OrIGQHsuF8uCLib4YqC4xPwIxHtWsdP i7lcs6arJm/2VKYnKEQlQKKXLO0ZKTRR0ILTVIiMR4x7moY/pDts6IAOqrM6h6gaAfL7VFNGTG1Sv utFcmRuHGIM20OeMxQ+k+7xbN4Y5mFKswRhYBBmKrZUtVDM4Fq4oG3RyXD0EiaPNaMt7Y85plLGa6 NCW2nBIw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55068 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 1liydg-0004HU-0u; Tue, 18 May 2021 13:15:56 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1liydf-0005BQ-PY; Tue, 18 May 2021 13:15:55 +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 4/4] 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: Tue, 18 May 2021 13:15:55 +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 457203b41ceb..2c74f1230cc7 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_limit = (u64)(VMALLOC_END - vmalloc_size) - (PAGE_OFFSET + PHYS_OFFSET + VMALLOC_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 8541AC433ED for ; Tue, 18 May 2021 12:17:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 4D6B260FF1 for ; Tue, 18 May 2021 12:17:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D6B260FF1 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=desiato.20200630; 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=8BrM67Tkw+Vufe2nkb4qPkaK0iFZ1YoiHtp+FnyWCqg=; b=FaYpBlq8h56C2U1VgmVB+p4Yo +At0WDMUgMCyYDXw8aDHASL1raMmtA/yFLNB45KqVbDhozYaYPfF5nFp13S5gf+n4zk5PLNsETEbF NwHnskI5ioZOE30cRWz0kSrvJlluu3Upt7NYoI0/8VzxD3w8Z1soTgC5/obh8MNtn0coR8DVP17hr enzutua2Otkv8f4plgQ3UahR3XcmeCU0KeccV0Z24YKMYCfipullUtIiEmy9roaIxc3D1tLGn0qOB TpmrZD2I/4HNHKVSSm1/WpF8JFOi9+pGDu8ArDOFlXwUjGPw7Sx3PBZ9ktU9b4dfXmNj2GBveM8ab obdTkYt+w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liye7-000j7p-Jx; Tue, 18 May 2021 12:16:24 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liydm-000j2R-Hu for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 12:16:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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; bh=c2+F1zL32ImCnk7eIDJcr6c8d1xl1EJQ2Q5jtE+xhe8=; b=UCkdvQWzmH4lB0guE3sIW9QTAU sKJIxkX5ADvUVE6LLe92Op2JMEBEUWx6sWOn76MMSWZpNNzhMJVuOQUjsVR4mSXDmo0Mb2x0CB2Uq vYO6h/i5Ht4Z/f9krdxv7L5530/I216hdZxlfaT3nOPR5/JEAs/W6bnOcGHsmvtuxK9mg2M+RQV5+ brZkJGK92Ib9I3EZheg7ZorxXH7oHa1e26Frcgr8LfV0WB+roP1zH1wvl5kS0sF8fjpp1eTP8LQfN gUcq+DQHvr1W+tS2gCCc57dliDYoO+H0AGYVaLK4e+cTajXA6gGZxj6JxlVhAMfKjtbGPDnrsyX7N lxNdr3Dw==; Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liydk-00EdoW-5U for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 12:16:01 +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=c2+F1zL32ImCnk7eIDJcr6c8d1xl1EJQ2Q5jtE+xhe8=; b=qqVcKxdipNAJBlgI6I2/5CndBt ufDfSi768Za5cfaBlc9LPPE0WmqrzTSaReiLT9mgPbEa0SxyGTOSyaNg3EDN9U0W+hfqGxoBDsGsz Bd4aK+9sazpX9HkKOb/UV8wUb3Z1Z0eydI9Ow9es4C44r3OrIGQHsuF8uCLib4YqC4xPwIxHtWsdP i7lcs6arJm/2VKYnKEQlQKKXLO0ZKTRR0ILTVIiMR4x7moY/pDts6IAOqrM6h6gaAfL7VFNGTG1Sv utFcmRuHGIM20OeMxQ+k+7xbN4Y5mFKswRhYBBmKrZUtVDM4Fq4oG3RyXD0EiaPNaMt7Y85plLGa6 NCW2nBIw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55068 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 1liydg-0004HU-0u; Tue, 18 May 2021 13:15:56 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1liydf-0005BQ-PY; Tue, 18 May 2021 13:15:55 +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 4/4] ARM: change vmalloc_start to vmalloc_size MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 18 May 2021 13:15:55 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_051600_230968_A8375899 X-CRM114-Status: GOOD ( 12.75 ) 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 457203b41ceb..2c74f1230cc7 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_limit = (u64)(VMALLOC_END - vmalloc_size) - (PAGE_OFFSET + PHYS_OFFSET + VMALLOC_OFFSET); /* -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel