From patchwork Wed Nov 27 07:22:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 180268 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp5736064ilf; Tue, 26 Nov 2019 23:22:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxMwRUdt90F2YcmG6DJF5jqE72TWoO7gXj4egDdsLBCx0EaXoxJhmZKgDLl6AoSdz3N0BN1 X-Received: by 2002:aa7:d0d4:: with SMTP id u20mr30428989edo.112.1574839358934; Tue, 26 Nov 2019 23:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574839358; cv=none; d=google.com; s=arc-20160816; b=mdRtjhUTAap/WGC1TeiJT/TS9lfVOf5EyhR81TfPznTDmoPDkE5ySGMR7Wx4ztDtHE Mlm/ES+d/SrXbhO3D0v7R9e95SUP/Xe9bl0fH89Zsup2s+rj8XUCGD/500MsYgADIjWN CILuZCzz8Vg8+h9wvqF2pRGmcQJqnbfhZsauvt2NRfG0ldPrPiR+9CFZ1MBgrqNetIrZ sYrPXeaVU1o6+1f2/RyHy6tBwmL0pb6W6fFa8TtmoaHFI1RHdHNJ6ygHqviSxJK1lRM7 tM6tAuflss/tLTu9Rb2M2fqLyK14xhu4mCXNSTECAK6I938EzfRQZQ0ecDoDOMBzsuzq NuvQ== 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=xBQD+e/TnUVrvhwSCfQXht9+xwZCKiD7itNG4fU+Fq0=; b=uVr2j1BAicbWOlM743Jkxh4lS5U4HlGdIwRLBZxt6Q2geUjW8NNJX697qzRQojcRTl ILhTPVAQ7Hqv/cfq9cL5FVVLStctTLs9KV04HvX//MPIGnzhMWQfLnBG1NQoV3Yt13Li iyxCe8wPbT6DTO5q4/N0Te0oNR1E0U1+yLz7WD5eY21/qoPxLU46jGmXTb/J/7zrSQGt bmpyhA5OLBArXfCU6C4XPU9v17WbQh+VoWJ8Qd5y3mvEq58qjSHDxDS67loyUC0Az4q4 x+htfHqBtOXx7d9p8JydHapkeWL4bVpLr04HBFNJXZr7WA5J2wAG6uuTveZ2bLZoPo35 x5lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q2LM0Nff; 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.38; Tue, 26 Nov 2019 23:22:38 -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=q2LM0Nff; 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 S1726514AbfK0HWi (ORCPT + 15 others); Wed, 27 Nov 2019 02:22:38 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36377 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbfK0HWi (ORCPT ); Wed, 27 Nov 2019 02:22:38 -0500 Received: by mail-wr1-f65.google.com with SMTP id z3so25354654wru.3 for ; Tue, 26 Nov 2019 23:22:35 -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=xBQD+e/TnUVrvhwSCfQXht9+xwZCKiD7itNG4fU+Fq0=; b=q2LM0NffHubfSWw1G9gXOM0FNLRtUcGxzKhp1N835dGtdhcC+O+N1Zsz90o4lMarTU dCykHEH9WgJlSoEHtKE/nimF1IOe+PVKjE35o8i3pnFNBfde0DmIfTARU20USPtwVXV9 BS5gNcVC5BkaoSwKXvStvSzA+IPQHgiqfzR/5Qh04ppfWA9WXuJ+nAmue2gN6V9iUJJn fmCypmSYoRYugx5K2UNJVFyh7zlyiFCVgN3BWglMUd+W1FWersq64ki/m3R9XkMHpqCx MgTXM5HvmIr/UVVJC29PFeIMHslGRFdm7PvJbGY1AhDtlB0iLcd96QtV3RfEg8UVun3g kGUQ== 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=xBQD+e/TnUVrvhwSCfQXht9+xwZCKiD7itNG4fU+Fq0=; b=P8Jn5mgK8pqSDw5hj0E2/+tkwFZ8LhQfuZSj75GR8lgPPogsmhRo9dhCnIseBkysVH tta/3VDYES5k6tKAytFnzPmv1EDf46TOrY7vrcZKdVltY37BtR9c4qFj7wzUIN+0E8Ge OS+BlgBep44RmeTPzV/Nni/dIzfeqVmc3yFwrlaWIR6yA3aNzbJyuY+tXxJULd2xlgRe xUy/aYJwtUzKNV50gbCkfmbHA0KGPCOffT35dFqBgfw/PfBrZ3Ji1fQf24DKePwL5qRK IUU5zgtJ5QwQzvEHQq61Dipdb+QD06o8HJloegqXJIQVccZdtnnNBnd2XC67aj3mq6gb 89+Q== X-Gm-Message-State: APjAAAX1jqlBRNLcvq0RDVgA89og/RYwseV3pYYsQrGCcyfoB3xJSL7F riSaqwroYjz01kpwvueMu4+6OTofbj4= X-Received: by 2002:adf:f20f:: with SMTP id p15mr38364653wro.370.1574839354216; Tue, 26 Nov 2019 23:22:34 -0800 (PST) Received: from localhost.localdomain ([95.149.164.101]) by smtp.gmail.com with ESMTPSA id g21sm19605289wrb.48.2019.11.26.23.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 23:22:33 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 5.3 1/2] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary Date: Wed, 27 Nov 2019 07:22:18 +0000 Message-Id: <20191127072219.30798-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 d5e0b908f0ba..25da9b2d9610 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1197,6 +1197,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) /*