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 BB684C432C0 for ; Wed, 27 Nov 2019 21:38:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 925DA2086A for ; Wed, 27 Nov 2019 21:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574890685; bh=XXB/goFev0IL2d9mUMYUsNOviHIV9Dho+s3GV8lNCjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TcbW/W/BNCBeSfMVwI6MuTsc4c5e7iuRu4+OSqskZTk+o+gNnv5jfvzLj1MI075Wm 8LYYclq+xF7ZD3IfjofSmOi+HMqvpCVDOSgrFm37mXh7ZusIfJNnG2ANqsytNh+NRl V1H3Be0vrCIe8cdvQ7umFjWSSvZAKFShSERtZA0E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729818AbfK0UqA (ORCPT ); Wed, 27 Nov 2019 15:46:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:57416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729815AbfK0Up7 (ORCPT ); Wed, 27 Nov 2019 15:45:59 -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 56DE721823; Wed, 27 Nov 2019 20:45:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887558; bh=XXB/goFev0IL2d9mUMYUsNOviHIV9Dho+s3GV8lNCjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gD+ReG7AUQI396O8gWb/pLqhI9y85z+FJTHRBzSrNnS7MVzoXcE8dZ7ef8rVJNppu TQab/0BA7Svfb2i4mzl9vCWD1/Um3gQcB5b7XHI91yipT+GosjJvsrfvPiSqf/Brr3 teGOT5I0t51gj/7NWljVn+lXXDCm51rmUJsSIQu8= 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.9 117/151] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Wed, 27 Nov 2019 21:31:40 +0100 Message-Id: <20191127203044.252568481@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 @@ -1188,6 +1188,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) /*