Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp161240ybl; Thu, 9 Jan 2020 19:10:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzCSWs2EBHEAs0fWHAIVH9M+WZnM+c6v2CmohAlVDGJzn33RDxjWDQbe/9MyvvkP2QY1jZ1 X-Received: by 2002:a05:6808:244:: with SMTP id m4mr552051oie.125.1578625833990; Thu, 09 Jan 2020 19:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578625833; cv=none; d=google.com; s=arc-20160816; b=mchoyH6NaTgjU73pUCeZY7L0ujCDUgWqUlQ1IGVvsOXv/SAXciluASaNHpInjhjcqi 3TJgHDkiaWjEGB0+sF76XZpnH9ANywMq+LX6Bvd9ZvDesXEcR6p/yQk1IvBVIaXOdz/4 1DwxIFlEYNU+snGoKX1hWdIGqzD9JHzYcBOeVuqSKseiOEZlYIjF7wYPobrXHBjC+E4d fLTdD+wEnUBJtT9/KBwVCMg6C598aHgrwL5oB5RTNo/GVBOmFjfL/+6v0LuXt4xk13tv sd6ef0G/4j4PtU/fr0NwcjCo/Q2voTjKCqGdbWDp324QTGLErKhRflGZE79a1DnzA6Jv huhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=qvac1DiD/CatnL2RLIG8lD9uhnusg40enBs2p7DdBNw=; b=h1v6xM8D4ztNDfcRqwCvuLr8LfrOKEi935GMS796tLwecJlrRkyYCIqe/bijcHHyZL TBKCDytjdwxx7pD2CXrwbiU6TdlHOKG21KvVqT9DN3p5Mx1cfPFJ4OvwO01YSBQ+wChs dAiCvyyP/gFKo3yP1DSq59+d69+N4lxvdpXPYoZD8+uzTPuwXHrT+aB90HyvBV6I4omM zbNj6cbPB4obfLWLec6mKJWuzUQGMGalK54KAKKwR4qmGPLb1AoCxeBAEhtZTA/im37e TInOI/RZD3fbNr/3LfFcL+/dw3gk5TGyIfEK9zzAamtfWdhCnzkwDh7XYDd4i2QFNBUR NvWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si287915oil.96.2020.01.09.19.10.22; Thu, 09 Jan 2020 19:10:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731098AbgAJDJF (ORCPT + 99 others); Thu, 9 Jan 2020 22:09:05 -0500 Received: from foss.arm.com ([217.140.110.172]:39046 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730952AbgAJDJF (ORCPT ); Thu, 9 Jan 2020 22:09:05 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2925411D4; Thu, 9 Jan 2020 19:09:05 -0800 (PST) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.42.128]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5672B3F703; Thu, 9 Jan 2020 19:08:57 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, catalin.marinas@arm.com, will@kernel.org Cc: mark.rutland@arm.com, david@redhat.com, cai@lca.pw, logang@deltatee.com, cpandya@codeaurora.org, arunks@codeaurora.org, dan.j.williams@intel.com, mgorman@techsingularity.net, osalvador@suse.de, ard.biesheuvel@arm.com, steve.capper@arm.com, broonie@kernel.org, valentin.schneider@arm.com, Robin.Murphy@arm.com, steven.price@arm.com, suzuki.poulose@arm.com, ira.weiny@intel.com, Anshuman Khandual , Rob Herring , Frank Rowand , devicetree@vger.kernel.org Subject: [PATCH V11 3/5] of/fdt: Mark boot memory with MEMBLOCK_BOOT Date: Fri, 10 Jan 2020 08:39:13 +0530 Message-Id: <1578625755-11792-4-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578625755-11792-1-git-send-email-anshuman.khandual@arm.com> References: <1578625755-11792-1-git-send-email-anshuman.khandual@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org early_init_dt_add_memory_arch() adds memory into memblock on both UEFI and DT based arm64 systems. Lets mark these as boot memory right after they get into memblock. All other platforms using this default implementation for early_init_dt_add_memory_arch() will also have this memblock flag set on boot memory ranges but will be upto the platforms if they would like to use it or not. On arm64 platform this flag will be used to identify boot memory at runtime and reject any attempt to remove them. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Anshuman Khandual --- drivers/of/fdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 2cdf64d..a2ae2c88 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1143,6 +1143,7 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) base = phys_offset; } memblock_add(base, size); + memblock_mark_boot(base, size); } int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size) -- 2.7.4