From patchwork Mon Mar 1 16:12:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 1445675 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=yrysth0X; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Dq5Tt3kwxz9sRN for ; Tue, 2 Mar 2021 03:35:30 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231812AbhCAQfQ (ORCPT ); Mon, 1 Mar 2021 11:35:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:36330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234875AbhCAQ3M (ORCPT ); Mon, 1 Mar 2021 11:29:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F137964EEF; Mon, 1 Mar 2021 16:22:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614615770; bh=pnj2q4mKwcEOetJykDtwV2xdO7Ak5cmiJLRktgJvHes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yrysth0XK2/k34ckjYO195UMK9NHw67Vm4p+Y8JX4zAF7gmfw+wSka2B5xVBcV8nP QpskzNmjbbOaddSLlkxrnyQFBpLygC50a3wQqZWN2PP7VJf0QYSZUl/8LxdvQ2Qgaw iS0WvLMjp/ctKFKvSdkqnzAM2Gpt4hqfiah565qQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, KarimAllah Ahmed , Quentin Perret , Rob Herring , Sasha Levin Subject: [PATCH 4.9 053/134] fdt: Properly handle "no-map" field in the memory region Date: Mon, 1 Mar 2021 17:12:34 +0100 Message-Id: <20210301161016.171027994@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161013.585393984@linuxfoundation.org> References: <20210301161013.585393984@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: KarimAllah Ahmed [ Upstream commit 86588296acbfb1591e92ba60221e95677ecadb43 ] Mark the memory region with NOMAP flag instead of completely removing it from the memory blocks. That makes the FDT handling consistent with the EFI memory map handling. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20210115114544.1830068-2-qperret@google.com Signed-off-by: Rob Herring Signed-off-by: Sasha Levin --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index e9360d5cbcbac..f90b626269ab6 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1159,7 +1159,7 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { if (nomap) - return memblock_remove(base, size); + return memblock_mark_nomap(base, size); return memblock_reserve(base, size); }