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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 ACF7EC432C0 for ; Wed, 27 Nov 2019 20:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BC5721850 for ; Wed, 27 Nov 2019 20:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888004; bh=lRPt9jymUbXWKctZ9s1aVDzxhXEFT0cUHXoT8XZU/sU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MzDjs8ZfwXnH66ugswv3KIfBlCkcio4KhmitAdBjSS/xN6NHoBogKdxQXxE17p7Rl XkFyCBpJkC6J5BVcZtdxhRWS630oNtHjnOktYrfgI63SX7kc9sVi4++7XQpDZmRThp 9XpegT+lSctitjOegRVia9K6l5deTegPXV2cIzbI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730712AbfK0UxW (ORCPT ); Wed, 27 Nov 2019 15:53:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:41852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729592AbfK0UxU (ORCPT ); Wed, 27 Nov 2019 15:53:20 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9016F2184C; Wed, 27 Nov 2019 20:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887999; bh=lRPt9jymUbXWKctZ9s1aVDzxhXEFT0cUHXoT8XZU/sU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w6tYkpZ1Ix/Tu4cYDogijN3i9fb/ACxbHIrReVRvM1ZStWy6oeU1zjcmqInSfm9QT z38LpPCeBlIT9YpHg+XYrpru41WB23/DZvXDLTpuDywBZbEza1tMVLcVYoe7IltC3y kebMDpfDKASStnYRKu8tQFE+2C+yZYi2CaJN+1RM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chester Lin , Mike Rapoport , Russell King , Lee Jones Subject: [PATCH 4.14 175/211] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Wed, 27 Nov 2019 21:31:48 +0100 Message-Id: <20191127203110.381286961@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chester Lin commit 1d31999cf04c21709f72ceb17e65b54a401330da upstream. adjust_lowmem_bounds() checks every memblocks in order to find the boundary between lowmem and highmem. However some memblocks could be marked as NOMAP so they are not used by kernel, which should be skipped while calculating the boundary. Signed-off-by: Chester Lin Reviewed-by: Mike Rapoport Signed-off-by: Russell King Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- arch/arm/mm/mmu.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1195,6 +1195,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) /*