From patchwork Fri Nov 22 10:51:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180028 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp66181ilf; Fri, 22 Nov 2019 03:15:50 -0800 (PST) X-Google-Smtp-Source: APXvYqy3mQy93jKT0EFKL+3zC8QRcPhliB/zRFcLKGS2Hda36lfSsngsqicqBCuhRGBmyO17s3te X-Received: by 2002:a50:eb91:: with SMTP id y17mr375672edr.216.1574421350120; Fri, 22 Nov 2019 03:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421350; cv=none; d=google.com; s=arc-20160816; b=cMd+FIccC3AS2eeRIdmsDrtx9iAEilRpM0bBpssdWMkvteQzaUwv6Qb6AiCTaUlwp1 vCJru74KmaAhYenr3dC2emeZMa7IosdDHQw7WOj69lAFp6HZkt4P9r0gB+5UFZpu7HGk P5lb4nJTtPMLsJb3f4tUKbvjchBxt4yPm6nLQ9rwo1cPp/hx9pYF58Jyx+YMvQsGrSeV GzFU3jtriN+Jlpx3Jmdtn1IIwkqxcYW2uy1cSsHDzTyZIZsxPP7+ONVZcXc3c57gV7b2 ULMQ98yKxqhq+FDgILbSSuvUtUuVIsSScLAKSo42cV8/0PGC4tt9b/zfd2nKzk2RdtsT IKUw== 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=hOK9c8LEfLGj1ZQvql1/dtYzUEEKXclu/9p6dFGwKr8=; b=R+Rh8WrPWv2rR87jCnOtDJ4yMDZRZ7NbIIDp9hQ7oShOhEXw8Wd2EhYkeS3HS05cQT cffrqmLgeWLIRYCKKyQ2SMoUEF+a6uAXELiyMbzw+Uz1oMM+wxZCQvWbWltKtW2zD0kA DeE+T/4RIi+2GR2ueYqPosoaHDZbtudv7KCXDrq0QSMB/ycmKa/F/98hm+hdu6Rd9ZfM jaT6jMpNm8H1+ANcuUdxd/q/sC9USuCSoC41qyyXZDPfcU1vEpUNltJDlP3L3cNSxSl+ 7Nn5CQPV6czMrNJAxvqSulPskLL2JaF74U6R0Rt6lUeUG49GPXsXpkxjNMqElKB+lyFC I33w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WICBWhDI; 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 e12si814823ejr.39.2019.11.22.03.15.49; Fri, 22 Nov 2019 03:15:50 -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=WICBWhDI; 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 S1729993AbfKVKvd (ORCPT + 15 others); Fri, 22 Nov 2019 05:51:33 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42618 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729140AbfKVKvc (ORCPT ); Fri, 22 Nov 2019 05:51:32 -0500 Received: by mail-wr1-f66.google.com with SMTP id a15so8026736wrf.9 for ; Fri, 22 Nov 2019 02:51:32 -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=hOK9c8LEfLGj1ZQvql1/dtYzUEEKXclu/9p6dFGwKr8=; b=WICBWhDIxvmJEc7PpyTMY93WSKHgLq3kfcXfcaEZfFENdrN1bqWqoqPBsjtJiGyZko wyRF6TmX6SqGKZwfy+9QqaVF2pYfN9quqczBr3TaEclRSjPKHUxTKjDqDEZJgtpgEYmD 21AoLQdHdKXLEN9f633cO4K5eHjwRL+Vr7KA4LK9mV4956R8/6EA8RvDEcPySSgzvcAo KcwP9KDMebhwxeQgZVd6CcONWCdlmHLD0jNW1Dku7DM5Xa2KRSxhIbAwEUlB3dv5WmqO XFjR5DLOViJLI6Jwmd+EMIJtMMPfzv7z5KqRl8PEyXgKnhC7twcGx+8+Ac3bBtV97Ad5 bg5A== 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=hOK9c8LEfLGj1ZQvql1/dtYzUEEKXclu/9p6dFGwKr8=; b=EHjICR1hwMiXu578DBzkCfcD7W+eZgCrYZBcDyUTWnmDzzD6muSAdQgbi2iLpv/Yxg SWz3x9haav0XXjlAPDHW+CpYUq80TQukgWQ1VLBwm7QZFwatN7S5qFMdbZNjXg4BlG/N VdOS4PMIUnF08B/LQ3LyVn85BkYqHjfhXj7FEX0Zov5a481IX8Hz1hT8vfUFcBsXl7Sz kfGewnihxhGfX5x/umX9TWzWGdHaPP/iUGk4kGxIDG0U4EK8NE3fatZOirCggkRXmpK+ K6ht1sr73lmKwU6sAu4nD0Z8fycK+7DXEuVS/ZlbWgs98a01OQV6mINOtXSDwIeGAmQU QZ2Q== X-Gm-Message-State: APjAAAV3dFjMBGLxN0M5r7cj8cZ7xYmGvmZJxAcqTzQxORHjAtvUsDfQ xmEv3Ac+ncis+3O5I08HUQL4vg== X-Received: by 2002:adf:ef51:: with SMTP id c17mr18196011wrp.266.1574419891724; Fri, 22 Nov 2019 02:51:31 -0800 (PST) Received: from localhost.localdomain ([2.27.35.135]) by smtp.gmail.com with ESMTPSA id w4sm2894338wmk.29.2019.11.22.02.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:51:31 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, gregkh@google.com, stable@vger.kernel.org Subject: [PATCH 4.4 1/9] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Fri, 22 Nov 2019 10:51:05 +0000 Message-Id: <20191122105113.11213-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 aead23f15213..d9ddb5721565 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1121,6 +1121,9 @@ void __init sanity_check_meminfo(void) phys_addr_t block_end = reg->base + reg->size; phys_addr_t size_limit = reg->size; + if (memblock_is_nomap(reg)) + continue; + if (reg->base >= vmalloc_limit) highmem = 1; else