From patchwork Thu May 20 09:21:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 445683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06CF3C43460 for ; Thu, 20 May 2021 10:04:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCEBF61D19 for ; Thu, 20 May 2021 10:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235254AbhETKFy (ORCPT ); Thu, 20 May 2021 06:05:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:38552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234756AbhETKD1 (ORCPT ); Thu, 20 May 2021 06:03:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C6DC1613BA; Thu, 20 May 2021 09:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503608; bh=2l3NEuziJ9EVnMkTSCwU7k8snLlxBFt3IaaXmm8n8Fo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PUjSGlgG1QnuQ7Qw3FxIL0tUQelU9+hMnUDCUlJVaHq1+iFRMyXAWH8PvJkAP1Qrp iybN0vDf5pYJyzKnYM3htV5cey71jDNtMcCdC/x0b2MIW/L8JqXRYCH83eOJBL/3Lp kNc1vKImbXv9VeKNPojLNJSoQ0nUC7Oadqve0+fc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Alexandre TORGUE , Quentin Perret Subject: [PATCH 4.19 299/425] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Date: Thu, 20 May 2021 11:21:08 +0200 Message-Id: <20210520092141.274600221@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Quentin Perret This reverts commit 74f2678aab60c9915daa83e6e23d31a896932d9d. It is not really a fix, and the backport misses dependencies, which breaks existing platforms. Reported-by: Alexandre TORGUE Signed-off-by: Quentin Perret Signed-off-by: Greg Kroah-Hartman --- drivers/of/fdt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1172,16 +1172,8 @@ int __init __weak early_init_dt_mark_hot int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { - if (nomap) { - /* - * If the memory is already reserved (by another region), we - * should not allow it to be marked nomap. - */ - if (memblock_is_region_reserved(base, size)) - return -EBUSY; - + if (nomap) return memblock_mark_nomap(base, size); - } return memblock_reserve(base, size); }