From patchwork Mon Mar 1 16:12:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 1445691 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=La11i8yD; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Dq6Ff44KGz9sCD for ; Tue, 2 Mar 2021 04:09:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235648AbhCARJR (ORCPT ); Mon, 1 Mar 2021 12:09:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:35192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237393AbhCARIP (ORCPT ); Mon, 1 Mar 2021 12:08:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 62E4364F83; Mon, 1 Mar 2021 16:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616855; bh=8wgMwc7LmJgtQd6NOmoMNzGIONIVgak4qsRa5KBJ08U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=La11i8yDHyKg/sJOqg0kK9q6S+i8dYLJrHQtBrkoyBrASE5IvsLlscJyz5irVhrxj KumUth/zlJwzEpLx4sDvMU4QlDgv0nmtToe+Bp0Nh9AVFyuhbqMdJDB2X4rmZSqj72 rFQDPW6JYdd8EnTjkeV1tiRemINAV3456sV4PcbA= 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.19 118/247] fdt: Properly handle "no-map" field in the memory region Date: Mon, 1 Mar 2021 17:12:18 +0100 Message-Id: <20210301161037.451876670@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 800ad252cf9c6..aa15e5d183c18 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1173,7 +1173,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); }