Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2099888rda; Tue, 24 Oct 2023 12:16:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6clVB2ik5CvIJp3CQR/cSh3O3FWg4KVID1s2oAVQ7QBwuit89BYejWWl8+puhE6cTsPv8 X-Received: by 2002:a17:903:110d:b0:1c9:e508:ad43 with SMTP id n13-20020a170903110d00b001c9e508ad43mr12040753plh.8.1698174966585; Tue, 24 Oct 2023 12:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698174966; cv=none; d=google.com; s=arc-20160816; b=LLZvtikhLUCW0n8+gy1gpu8iMTwYi5adOwy1EA7dZtBmRNw1V1obQC8SNWJFM9aj6W Uu8mmQzgRvEma/FhEJQfEqAS6WEi9P4ucI+h7tw11AJeWB49WghFr3K58NEx134yqnfQ Pcr6pfxL93kaVRKjmiOFP7SLYKSLWkzQyhUkGG2mWTEehzmqwCTonJNllVeGlwWG7nQE 4afYORgawp6ivUZy/khs1I7xMj0fCXfmcoPFKFBfWcFKb53gH1TpalXXSM/3UOEwuM3G 0mGfC3gR7n61ndBi4VFYi0WpX4B9QshVHLPB5UkAOqLrYSGpUcqiKhUPSeGCZw4hCdAU pMLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fc7wsu+Ez53X61VDpaWVir82UtYO/AqwmwLE+WTcs7o=; fh=q7ubNN3nGbQ1rSOoNR72AdqeVS2TNwGtlRTH9ty+6uQ=; b=tsYk78lMkCw1pgxYTxKNHTv47eJoCAK87t1lq4kPG5WTh/8qGbiP1bI17FLXu7t5kh 6hckCVOAGM3PBWfTRQhmmdKpHqrLinXYLExBXSl9qggLIQlgR9bWtMWuL/YSBaRVyuOu xyd9F4PszS6bdx3XOkIsqv5rR/nnFRaemTYktit2iALeyXwJvbjFDrNSmb6IUDi+opbM wrdWRUYdm1U1k7ho6Ltk5UzpwiaUOaz2fGKfXO2oVx3GYP+H4h3GecK05rJQO4aMlXMn eIQqfnEb0MfrbL/swLaqEAQ4GksAlK+AaFEPBt/l+dBB/wtAUksE1YqWMEzTQvLOKBrA 8Ufw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ij6-20020a170902ab4600b001c9e765e151si8737772plb.116.2023.10.24.12.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 12:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DD59B807972C; Tue, 24 Oct 2023 12:16:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344217AbjJXTPx (ORCPT + 99 others); Tue, 24 Oct 2023 15:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344021AbjJXTPw (ORCPT ); Tue, 24 Oct 2023 15:15:52 -0400 Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 631C1109; Tue, 24 Oct 2023 12:15:50 -0700 (PDT) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3b2ea7cc821so3393621b6e.1; Tue, 24 Oct 2023 12:15:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698174949; x=1698779749; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fc7wsu+Ez53X61VDpaWVir82UtYO/AqwmwLE+WTcs7o=; b=Ympkgw82amTwWMA7C8Sh93ah33FrMYi8aLpgaRRRxltyRb6tJuNXWzFUQ2B/YHuBel 6hACTWs9dHYkLHdHUyHNsqIPe82p5aGezlWKBF5jwaY58ojq6TXFiOXatAccCWQOAUx4 GdqEcuVCCw+7LffSEYWCATvmnxATyBL83wLjUomtjrpQNGTMGXYlYhRPESuq8ac+cKbl tBPkU6qQm/rxDtrBRhut/gNDb8wOuZSi7JU+5JGW98oB5z1fAQY2UGC0aJ2WcND3aJ1L GDr2TnpYi9jS1e42iQJo2Pr+CWtR/4pP6896cCDifvf5zMWbyqM88RUlyDCNOAVwuPzM HK0A== X-Gm-Message-State: AOJu0YwUHxZTgUE3Hzulnered2bHQrQQf69XVjCcVx6crwRjcjRnGKEq 5D/YVjURPn80iv/GK2/GyA== X-Received: by 2002:a05:6808:181:b0:3ab:8574:e8ab with SMTP id w1-20020a056808018100b003ab8574e8abmr14532474oic.21.1698174949695; Tue, 24 Oct 2023 12:15:49 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id j5-20020a056830270500b006ce46212341sm1399103otu.54.2023.10.24.12.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 12:15:49 -0700 (PDT) Received: (nullmailer pid 403998 invoked by uid 1000); Tue, 24 Oct 2023 19:15:48 -0000 Date: Tue, 24 Oct 2023 14:15:48 -0500 From: Rob Herring To: Oreoluwa Babatunde Cc: catalin.marinas@arm.com, will@kernel.org, frowand.list@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, kernel@quicinc.com Subject: Re: [RFC PATCH 1/3] of: reserved_mem: Change the order that reserved_mem regions are stored Message-ID: <20231024191548.GA358703-robh@kernel.org> References: <20231019184825.9712-1-quic_obabatun@quicinc.com> <20231019184825.9712-2-quic_obabatun@quicinc.com> <7e6ddffc-81a5-4183-9e59-7060776c936a@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7e6ddffc-81a5-4183-9e59-7060776c936a@quicinc.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 24 Oct 2023 12:16:04 -0700 (PDT) On Thu, Oct 19, 2023 at 03:45:37PM -0700, Oreoluwa Babatunde wrote: > > On 10/19/2023 12:46 PM, Rob Herring wrote: > > On Thu, Oct 19, 2023 at 1:49 PM Oreoluwa Babatunde > > wrote: > >> The dynamic allocation of the reserved_mem array needs to be done after > >> paging_init() is called because memory allocated using memblock_alloc() > >> is not writeable before that. > >> --- a/arch/arm64/kernel/setup.c > >> +++ b/arch/arm64/kernel/setup.c > >> @@ -27,6 +27,8 @@ > >> #include > >> #include > >> #include > >> +#include > >> + > >> #include > >> #include > >> #include > >> @@ -346,6 +348,8 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) > >> > >> paging_init(); > >> > >> + fdt_init_reserved_mem(); > >> + > > You removed this call from the common code and add it to arm64 arch > > code, doesn't that break every other arch? > Yes, the same changes will be needed for every other arch. I was hoping to > get some feedback on the RFC before implementing this on other archs which > is why the change is currently only in arm64. > > The very next thing done here is unflattening the DT. So another call > > from the arch code to the DT code isn't needed either. > Yes, I see that unflatten_device_tree() is being called right after here. > Just to clarify, are you suggesting to move fdt_init_reserved_mem() into the > unflatten_device_tree() call? In general, I want fewer calls between arch code and DT core and for the DT core to be more in control of the ordering that things happen. Your series does the opposite. Rob