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=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 9EC97C3A59E for ; Tue, 20 Aug 2019 11:57:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 696E422CF7 for ; Tue, 20 Aug 2019 11:57:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="mQnUignn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729788AbfHTL5C (ORCPT ); Tue, 20 Aug 2019 07:57:02 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:36142 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727006AbfHTL5C (ORCPT ); Tue, 20 Aug 2019 07:57:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=viiM5yef80mqYHoKubrPSE4uLR54U0Urs44z5uxA47U=; b=mQnUignnqiBHoHq4snqG+ZRNV vZZ9u5OQGD/zs0XLpbn6qTbGj3DCsO8rDSF1Mp9exhjRsGuIfplteaRjLYaIt2S1X37WLjaZHt2qo BIZOigOwmPOnGyn4HjCsbrUH69ZUPB0TZ2wA34q/E2kBRzHKahQG6M0T86P31KOhRwZMvmf2sw+7j IhhmGGkbzxSYZLjH6rL6hJ4q9QKGR5raLcNs7i0Sdpt+M/kB/w5lUVbKMH3LTDoXlmtWvYoD1IozU Mlin2XuG2Fzf34UwLqObDThoIECgqfzSGVSTKsRl1n4IJK0zhZbioBrn/ARbJm8CFs2W9JrWqhv2G /of5Tn8vQ==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:47222) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i02kp-00021b-52; Tue, 20 Aug 2019 12:56:47 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1i02ko-0005mY-1U; Tue, 20 Aug 2019 12:56:46 +0100 Date: Tue, 20 Aug 2019 12:56:46 +0100 From: Russell King - ARM Linux admin To: Chester Lin Cc: "ard.biesheuvel@linaro.org" , "akpm@linux-foundation.org" , "rppt@linux.ibm.com" , "ren_guo@c-sky.com" , Juergen Gross , "geert@linux-m68k.org" , "mingo@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , "guillaume.gardet@arm.com" , Joey Lee , Gary Lin Subject: Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base Message-ID: <20190820115645.GP13294@shell.armlinux.org.uk> References: <20190802053744.5519-1-clin@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802053744.5519-1-clin@suse.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 05:38:54AM +0000, Chester Lin wrote: > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > index f3ce34113f89..909b11ba48d8 100644 > --- a/arch/arm/mm/mmu.c > +++ b/arch/arm/mm/mmu.c > @@ -1184,6 +1184,9 @@ void __init adjust_lowmem_bounds(void) > phys_addr_t block_start = reg->base; > phys_addr_t block_end = reg->base + reg->size; > > + if (memblock_is_nomap(reg)) > + continue; > + > if (reg->base < vmalloc_limit) { > if (block_end > lowmem_limit) > /* I think this hunk is sane - if the memory is marked nomap, then it isn't available for the kernel's use, so as far as calculating where the lowmem/highmem boundary is, it effectively doesn't exist and should be skipped. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up 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=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 1DA8CC3A589 for ; Tue, 20 Aug 2019 11:57:09 +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 E160622CF7 for ; Tue, 20 Aug 2019 11:57:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YUHNBxZt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="mQnUignn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E160622CF7 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+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xkcVEKq7+GJ1q6r4gt2TSHrCHE02SBKFVfN6agF+S6U=; b=YUHNBxZtTbVB9f QiJRWLcIJTHlD7iYeXTxxLkpjJIgvh3SnKqD6Zz7KBYlV4A50QDyPXcgou36yw9ppNywEsyzN8gmx Fnt+8fRzmy2Kv4WoJBRx4MLFeMl6fp2W7lxd1gmLwgfoz2SGja084b3j2MM6LlDOojGn9b6qgNbpC wWBNQGgGOvcmE6nlWZ8uQfwr/otiHc+XNz8jAWei1a6fg34spnnYvMAURLoc0AjCq+zU+kMn07fCW rGHRxWcjIovXTSUGwR6KxX+oMQkFlkgt9+BI7IlpkM5rzrNBWXdmWY/xyZ0GcpzUqCTsjD2O/Hkns f1nDgtL16zzOFJO+XOgQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i02l7-0007jo-Fj; Tue, 20 Aug 2019 11:57:05 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i02l3-0007gz-37 for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 11:57:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=viiM5yef80mqYHoKubrPSE4uLR54U0Urs44z5uxA47U=; b=mQnUignnqiBHoHq4snqG+ZRNV vZZ9u5OQGD/zs0XLpbn6qTbGj3DCsO8rDSF1Mp9exhjRsGuIfplteaRjLYaIt2S1X37WLjaZHt2qo BIZOigOwmPOnGyn4HjCsbrUH69ZUPB0TZ2wA34q/E2kBRzHKahQG6M0T86P31KOhRwZMvmf2sw+7j IhhmGGkbzxSYZLjH6rL6hJ4q9QKGR5raLcNs7i0Sdpt+M/kB/w5lUVbKMH3LTDoXlmtWvYoD1IozU Mlin2XuG2Fzf34UwLqObDThoIECgqfzSGVSTKsRl1n4IJK0zhZbioBrn/ARbJm8CFs2W9JrWqhv2G /of5Tn8vQ==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:47222) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i02kp-00021b-52; Tue, 20 Aug 2019 12:56:47 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1i02ko-0005mY-1U; Tue, 20 Aug 2019 12:56:46 +0100 Date: Tue, 20 Aug 2019 12:56:46 +0100 From: Russell King - ARM Linux admin To: Chester Lin Subject: Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base Message-ID: <20190820115645.GP13294@shell.armlinux.org.uk> References: <20190802053744.5519-1-clin@suse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190802053744.5519-1-clin@suse.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_045701_134551_94AF2ADC X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , "linux-efi@vger.kernel.org" , "ard.biesheuvel@linaro.org" , "guillaume.gardet@arm.com" , "linux-kernel@vger.kernel.org" , "rppt@linux.ibm.com" , Joey Lee , "geert@linux-m68k.org" , "ren_guo@c-sky.com" , Gary Lin , "akpm@linux-foundation.org" , "mingo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 02, 2019 at 05:38:54AM +0000, Chester Lin wrote: > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > index f3ce34113f89..909b11ba48d8 100644 > --- a/arch/arm/mm/mmu.c > +++ b/arch/arm/mm/mmu.c > @@ -1184,6 +1184,9 @@ void __init adjust_lowmem_bounds(void) > phys_addr_t block_start = reg->base; > phys_addr_t block_end = reg->base + reg->size; > > + if (memblock_is_nomap(reg)) > + continue; > + > if (reg->base < vmalloc_limit) { > if (block_end > lowmem_limit) > /* I think this hunk is sane - if the memory is marked nomap, then it isn't available for the kernel's use, so as far as calculating where the lowmem/highmem boundary is, it effectively doesn't exist and should be skipped. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel