From patchwork Wed Nov 27 07:22:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180264 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5735924ilf; Tue, 26 Nov 2019 23:22:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzY/7j3iy82CKQNjBMcBod0j/pyMtOsh229Cmgy8ig4L71ghbXoDw1wAazWcDkeONAbIA6M X-Received: by 2002:a17:906:b25a:: with SMTP id ce26mr46989405ejb.13.1574839350481; Tue, 26 Nov 2019 23:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839350; cv=none; d=google.com; s=arc-20160816; b=VLp1BzHWDlBnrVsTdhP0XpA18suy1iBZaZH3vG5Art5y3i//9dg6cn74h8LvPK3qxk vnl5+HF7zcbnf27BMhK55MIBACBLB4pVIGHsUlNTDTmpcXrqhbjZ6giuzy0PU6PDNfrG SNQCeW8boZwTOSjcCfm4S8u8Kq4nFPAlhbYhj5dXuXxDmp11BYCdQJtOyhBMAzwavmOh UwXhRr0reCGJI5RovmMtdX9ixaC6lV9VFo+QNZN4ll020sfrdU5sQepExG5vbQ0p6aQF uX7424aSP+h8a3lo2vdGGrImeqt6SGijG/wcalPM7Jdhkhoe3RwiIgv503waFNODa8II lhpg== 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=HKmKV2QnHf6L1Be1GDSF8wA+iVwfLA2DutY1g50TZSQ=; b=Z3rL0xrNc73Z+Frz7Z/SdnPoaNa25l7ZZtZzLa2W1LI+7JMs7U6voAoCnLAFVaUaKW UQoRXq9C2Z5ShDD5h30xob6ZjKGX6k2d1R4K2EeuqDzpKJ/JCVNaKxAT6uZfuNbDp2x6 PB5VNm18hJVob5godsHS5tNVukHiqdJk3Ssq8gqS1n6KJAlGMC54KIB5nG46XStdP0A2 sHvzrwUjSnbrD6ynbw13NcA06KV1j4MBJhGeCaD1YLFG25xLgpHtdQBJyvoiV7W3drDw o1pCuJEsbCpSW03i+A7ClDFmcNUR8+rxobOdYEoouuQqLzWDhvfVnSqORQNkmKDKIHi4 krsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NBlVlsL9; 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.30; Tue, 26 Nov 2019 23:22:30 -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=NBlVlsL9; 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 S1726515AbfK0HW3 (ORCPT + 15 others); Wed, 27 Nov 2019 02:22:29 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54386 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbfK0HW3 (ORCPT ); Wed, 27 Nov 2019 02:22:29 -0500 Received: by mail-wm1-f68.google.com with SMTP id b11so5858694wmj.4 for ; Tue, 26 Nov 2019 23:22:27 -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=HKmKV2QnHf6L1Be1GDSF8wA+iVwfLA2DutY1g50TZSQ=; b=NBlVlsL97KGwwCAPQ7DAncBZNY0kxh+nt1m9SZ3ouwiA9cTnV4WQZvIEqNi4S6G12G U3OoSyyO0eXoLoaNz5ZdeCxjRsA8TWTZS22tg455uHWbXVKvfYIvunULQLVbPdbXWElO 8XG20hKxle6bKhWPozxzo5PUgMy+QwJfYwL8QDWzm9J/1OaCh3xp8Z47cbYv0BfXrqOc QlN0IbMg4cskZDgVzli54sU7eMexwYRrqowUkine3lZCl8ErPc/pDmFtoJ2G/BLYnbDQ 12rl+XRq1hukXfrJFtFdpPuAFsGRFNU1XepjK2/t/zNNlJ0dV3wXndkA6mE6r4sPp7fZ fPYg== 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=HKmKV2QnHf6L1Be1GDSF8wA+iVwfLA2DutY1g50TZSQ=; b=r6HbwbX84hzlbpFjYRwvu/toi9MJNELVXgH0wi0wwA2mxrVYLwfGk4DkT0z5O3k0B+ OsnRe9/SHkmOBpg+epmGwiUkme0nxO/hkL0/yJQ++2wfgcSRrkhtWkzclEMmOQG45ZH9 1XQXjjpAmFhV2hyq3itfWNbdiF0zSyvtDydD+rh5D01cSgg5h/fOoeQ+dYrr9S7asBOg upA121JK8ZSARC1K6hUf2Ts3AZ59qciGE6N7zOMkMToDlvLK+awurxM90hUxh7q5WLOr 78rz3qOCnmX/6DGLwsCP64o+dpf92flFxQNG7QJ+tKuN9QJL99WkngW2BetgLrk3vEZA tG7w== X-Gm-Message-State: APjAAAV/w7fufguzTbpe3SiAmTJZ4ilN4RBwhmuLNuCjYZONtv30AxED UEXLYLFaPKFjaNz7743hOMW4dvbldlw= X-Received: by 2002:a1c:7f94:: with SMTP id a142mr2644622wmd.33.1574839346273; Tue, 26 Nov 2019 23:22:26 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id c193sm5986641wma.8.2019.11.26.23.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:22:25 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 1/3] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Wed, 27 Nov 2019 07:22:08 +0000 Message-Id: <20191127072210.30715-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 70e560cf8ca0..d8cbe772f690 100644 --- 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) /*