From patchwork Wed Nov 27 07:21:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180253 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735581ilf; Tue, 26 Nov 2019 23:22:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxrf5obd/86xOqTJR2uEZ3BkMoPtUjTR8jb145tf0385RSEad2ecI/+tLrdF2BX2zvHxopT X-Received: by 2002:a17:906:1611:: with SMTP id m17mr48609615ejd.281.1574839327267; Tue, 26 Nov 2019 23:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839327; cv=none; d=google.com; s=arc-20160816; b=NVVz+oJRgSUYsyWrHbrjSozC3LiX978OOqrNLGQjChs+hmygcOnq2rXtcbluh440Ia Fdc5I+XpkBTahlF3lf6plYznL/GhI5FLdaBBWj03ZpBdyRobVlRSaXzb99HLVOsVZRh2 I7VA61IL5MqVjyGUzuaMgwWbF43DK2FwDJLMQ2BDOOUxUJfDbyzEAxBjDhB+BKfTlHPG 078NpDjs5WTVu+rqGXeaJswTzeSs0YgKpNp4XWO9ayc3FU5+23LBdR+xopnLXsj1c8IT cL8zhdpetuszzB3UBZfblzwTE/c+41Vd87AOxYW9qomMyr/Kh4hFPqQA2ggNQx0ZBK6N s7DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=UWRbO2P7g4EPCMmLRyVjfEAuVW+/g1Ubr25lGtwVdcY=; b=TfeY82O1yzgT8eSaQLKHt6NsC094Ks2s0SdzYR8Vv7Ub00oOVKKfsB05kXw+D7S2Dh WeHKDiGNoF1fBaZhw+rKReg/DStCsZOgxEbIVahvBeB3EBjslFOVNi/+lvcwa3XDpv9U 5Psri2osafvLABlF6mKo/B1WB1+2jnRdycZCIXmA3Ad2j0IFyX4k4OgxboZkDWgl/nKz GQGKPVrGNyxAlRhIIXWUfBzHA37iQYPXYvVO7cNf1/Vp5yOrhpsFQZav+TfFewUCixSj 1EYWiSM/mxMDT8XwCeHyZB06wrRxfvcyPTNSRL/TA2iJ93g8fSnn0w+INbGpxe3KHW0Y Zg4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PkBawT7c; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si69058ejc.66.2019.11.26.23.22.07; Tue, 26 Nov 2019 23:22:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PkBawT7c; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbfK0HWG (ORCPT + 15 others); Wed, 27 Nov 2019 02:22:06 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45865 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbfK0HWG (ORCPT ); Wed, 27 Nov 2019 02:22:06 -0500 Received: by mail-wr1-f66.google.com with SMTP id z10so25275799wrs.12 for ; Tue, 26 Nov 2019 23:22:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UWRbO2P7g4EPCMmLRyVjfEAuVW+/g1Ubr25lGtwVdcY=; b=PkBawT7ckvErv66yavO79Cb2B9m+9s8C+5vgtgN7tImRaIt8Sk6Y6hKdUjFaM45u8o PCLwrOlT4IzF/g2foIHl7ECmt0WEtQR12j2P+R4ac515t02D762zZ13ZX+QeI4QwIlVh 2AxlFEXW9qV2cQ3q9Xf3emNwP4oy5IqoIVhFjskKTpMeyPPbFEFDc/+ugb6cIDxI/pDo uJ5pJHEtWVD+jVhZZX/YL9IHtTEWtvUTsRyxpGpvbtlgqZN4WxOmR/etCG89B+Sxde4t DXAmKZJj0C5KsfvtaRvq+MvWhvcU0BsR8e1I3aql67CeGOTaJNJG8YCL5jXhOfklHF2y MbhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UWRbO2P7g4EPCMmLRyVjfEAuVW+/g1Ubr25lGtwVdcY=; b=n7YqxdnfbFpWsDp4pUcT0fj5+yxxL6Gw+EHX3vEXv2C4oseepUfqqP1NPDrbY0QgGw seK5yRxPIdzAOrUtmUenBl5zvbNLeDVRQBws4w3gA8sEPG2iTiyY00508YqOtww6EdeR YIgXX3NpXGECbiydFsJABEb7DfGjOgnSbi1zjUjIU5DO0zk3qGZkQW5MKvvIUlaJMf8t 5CUb2gHFtDIX4qT2IaMRbyUIziV+9MRTTy63PPEdvsXjrNHdGhG4TXxNNJ0Yg0sqxpe1 MklppyyG/b5DInD5ZnBCsbI1QdUhYNWCpnAf7qLkpYrVjYHHLeFLnnw8hAnCqT/9ERz+ RFvA== X-Gm-Message-State: APjAAAWuKO0f+ulSSduMJppOc5ryvqAcWG5BrldOL+39lTfT4vaEDQaO dnO4nGwq0gcXTrBl2+M4Py/L5vqdKMk= X-Received: by 2002:adf:eecc:: with SMTP id a12mr29427632wrp.363.1574839323938; Tue, 26 Nov 2019 23:22:03 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id e16sm17983130wrj.80.2019.11.26.23.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:22:03 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.9 1/6] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Wed, 27 Nov 2019 07:21:39 +0000 Message-Id: <20191127072144.30537-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chester Lin [ Upstream commit 1d31999cf04c21709f72ceb17e65b54a401330da ] 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 --- arch/arm/mm/mmu.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.24.0 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 241bf898adf5..7edc6c3f4bd9 100644 --- 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) /*