Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1302624rdb; Fri, 19 Jan 2024 15:10:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0tVJOr4pTYih7FtjVSxKHaAgtDSuxF4LJ+1cikKwRpr45SPEDhVcAl3ORQAgACali+BQ/ X-Received: by 2002:a17:902:70cc:b0:1d7:204a:80f5 with SMTP id l12-20020a17090270cc00b001d7204a80f5mr686403plt.14.1705705854446; Fri, 19 Jan 2024 15:10:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705705854; cv=pass; d=google.com; s=arc-20160816; b=L9xzHuWIQ3KcDI3i/UnyuwprSyX6FFag9fvYaEPjfa9UhfYDg86GlOyH18dx5lnRYn Hr+J8fggNMBKlt1tEZnZwaqi/rFhVyxbaqFvi39W7c/3i3fnjiveCA2t57/I3DATAU6m oJet0bMjKFHmMSRQUo5HCapq864lhKUGPWrB9qAv9+pkNijaPEI7CpMrHsmAXjvJn/CW kEAu/Vmx8Ddpm0p9xXb4LHy30HFsaWgd42OaPjZg9Wx9UsrUjDJOXHTWY6rmRooos7oy e6jsC1keCD0ZY3X+T11jCEvVeiLCA3ZLXLC6R3h5NRqOfZcMgM9vW5/ZRB9nDg92X2+v HYaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9IV/ZmeBzcGbXtPhwhP5/GxqE1BHMbmaPE0pVB1IAhg=; fh=nS8bw090SjEASUckFbcjo5728pu4Gu/VBhcOVo/f1Xo=; b=leWq6eOLZhW/Htw/bx1vg3lQ5sF0K7VS4vURlyiJMiCU/j/zh6xroa5iUJMS/lo+WA gaIOKfUI93ZnjfkD8F8bEjRO71QsXiJHXc5udWJVoI+OTgRa7rZGNicb/oVuj4jSK2L1 yJ9GpFUdLPizHoSK9iy5Ey/ThlzfSUiUKW8VJAc3zGAUOd/TPi+lx0B9IoQYR20mrMDM XU764MK3lpKrFvoMpv3dn9jcbYDM+3R6zqaPLRgK+6DPVYPRZJwJ5u2CLJebHJJ44pxl lAOklK9dCj/D47yozCG4HQlgpks/koY3AP1QL2wrIhmMBq9jPYibOrNZiEZ1BnGMjWAK uxMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H7as3jph; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i6-20020a1709026ac600b001d4cea91cedsi4002745plt.285.2024.01.19.15.10.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 15:10:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H7as3jph; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31623-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 77FC9B2180C for ; Fri, 19 Jan 2024 23:10:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDBC858ACF; Fri, 19 Jan 2024 23:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H7as3jph" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D85C438E; Fri, 19 Jan 2024 23:10:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705705840; cv=none; b=NaF2dENO5XWwL/FHIbHX8bNFUlaZHbuwYcQ+ubTXqqLAGBBBJEDXKkM+pnJDL16RL2RPLBAR1V/Px7CX5ZLZV1gyiKB9RIW81dBQK/J4ETF8n0EclQhwhwjnTttHOpsHcPHuk0HpsZ17Yw1BtXgoXl8a/vX/Op+H9krH/2pSezA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705705840; c=relaxed/simple; bh=hLvySJOGh3H9r6ZYVIGvpuQ7Zcb/pUmD6s9QAjLdlmU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nvEbD1Wa/ChF7S4HdIVRZjFXDK7sM9OXhZhWZYjZo8sGrh3i6ADZPSap8fTgTv8k5tT/1O1+mGexkPEEPu1GvO4Vhj2a9YyK+8ViTn6J5vlIIQVw9GHp8RZVYUeCPbsZu9puc+fjdlSVVtdKu8ItoflYMlQgjmJ2WrVPRzUvF0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H7as3jph; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26A2AC433F1; Fri, 19 Jan 2024 23:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705705839; bh=hLvySJOGh3H9r6ZYVIGvpuQ7Zcb/pUmD6s9QAjLdlmU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H7as3jphr/I/+VOFoHA/dDZFNvfVfRn2PMpnFrkReodXeioRG9Q1/QXBCBYASb4Oh ASbADsHm7oaSU2U8sAMhRBhkG1hZzvwQLNVmdFti9FJEuofwnUhUb1KV18Nrt9Eo4E TTOIGmp3+6Ay5A/JwyUwsD1pMfNyffItFyqA3IoYaf6vSrpX2up4Hfxbq9G4SIXDPy iA8+yMQzQg/IsjvDXpCCcl9D700BjuCgPyeOSSZXqKfNx/+ZsuVYlIxCDjwJ7Wdm3W eNbnDH33gPh8XnnEaFCuJTEF6hh+z9MgoRmk1zEqsj7S5X2/Oc7tCh+Xueumv6IL0T 5gFqj7oSlYXhA== Date: Fri, 19 Jan 2024 17:10:36 -0600 From: Rob Herring To: Mark Rutland Cc: Stephen Boyd , linux-kernel@vger.kernel.org, patches@lists.linux.dev, linux-um@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, devicetree@vger.kernel.org, Frank Rowand , Catalin Marinas , Will Deacon Subject: Re: [PATCH 1/6] arm64: Unconditionally call unflatten_device_tree() Message-ID: <20240119231036.GA1247053-robh@kernel.org> References: <20240112200750.4062441-1-sboyd@kernel.org> <20240112200750.4062441-2-sboyd@kernel.org> <434b21afe1899b1567f3617261594842.sboyd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jan 18, 2024 at 03:26:43PM +0000, Mark Rutland wrote: > On Tue, Jan 16, 2024 at 05:27:18PM -0800, Stephen Boyd wrote: > > Quoting Mark Rutland (2024-01-16 03:51:14) > > > Hi Stephen, > > > > > > On Fri, Jan 12, 2024 at 12:07:44PM -0800, Stephen Boyd wrote: > > > > Call this function unconditionally so that we can populate an empty DTB > > > > on platforms that don't boot with a firmware provided or builtin DTB. > > > > There's no harm in calling unflatten_device_tree() unconditionally. > > > > > > For better or worse, that's not true: there are systems the provide both a DTB > > > *and* ACPI tables, and we must not consume both at the same time as those can > > > clash and cause all sorts of problems. In addition, we don't want people being > > > "clever" and describing disparate portions of their system in ACPI and DT. > > > > > > It is a very deliberate choice to not unflatten the DTB when ACPI is in use, > > > and I don't think we want to reopen this can of worms. > > > > Hmm ok. I missed this part. Can we knock out the initial_boot_params in > > this case so that we don't unflatten a DTB when ACPI is in use? > > Why is that better than just not calling unflatten_device_tree(), as we do > today? > > The cover letter says this is all so that we can run DT tests for the clk > framework; why can't that just depend on the system being booted with DT rather > than ACPI? Because then the tests can never run on x86 and some people still use those systems. It's no different than why do we compile !x86 drivers on x86. It is convenient. > We have other tests which are architecture and/or configuration > dependent... There's another usecase of non-discoverable devices behind discoverable devices. See my LPC session slides for more details. For this we will need some base DT to apply overlays to on DT AND ACPI systems. This is what Geert was getting at. Yes, it could be done with some other code path, but the DT unittest has done that hack for years and this series is getting rid of it. Rob