Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp3422rdb; Mon, 15 Jan 2024 09:57:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaGqWMiH491/mBFZkNqW2gpzHRJo3lh3YGc2Jkvf/UzJshWLtQV+3Ip42M3TghMJ2//j/2 X-Received: by 2002:ad4:5d6a:0:b0:680:b48c:b54b with SMTP id fn10-20020ad45d6a000000b00680b48cb54bmr8370455qvb.102.1705341452629; Mon, 15 Jan 2024 09:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705341452; cv=none; d=google.com; s=arc-20160816; b=XvxY0bp0M65nNjgVRztiKG3VoIsfXFn42xBSqJ0BPHtfXOv1Zh82EiO85oj+kIFhdc Vc1t6Fl7I24hLJY/bKmkLASBqDgMf8bkJ18GfKZk6owVfH9FY36LV5Fjs0GcVOnZgI5b 1Q85ufG3JLKsjhNXsmhKBQaseeV/PYiHU+Rt/ilV8EE90OqFovcw3BdLb6fzQWDkfLmB G/qCWg3riuiJQD65/3nMjIU/1HbH5tBzv6AGIaOFOSOUQ00yz3t5d9BgCmH/8gXJW1C5 7z2tSJiD3TMMkYdQ2M3fCbDbXxX5LB2wxNGs7IFvAYNvOM9EgcYRnQmFLqIdWQY1hB8w AQcQ== ARC-Message-Signature: i=1; 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=/1nw2uXWDl1a0Y8x/WBBs08kxcDRyDODFBsQ8376Ju8=; fh=jy2oqrM6FlTPU4Ax2+Qaj7n73hUkBXcqXiy2P8VIWnE=; b=ll/xrBau10637/8Z4jzOB7RtFCdcttsgaFSN7Zd30T2Tb9h0XC/V8ZSIX5TP5oQpRA c/7SzH3+19OVx192Fgx5XYfh5NPASZTVtcY0fgu+jetRjIpCVnKPpnjOCy7TzKuwPojz GX0ajoFRayfy4JcSwW86ApSJ//6neY7BQ38sTJ481XAkMtoi2a8X80qKr6AcPzkS+Pag l1PN3v753FSBPV07NkEOioh7FEx8w8+FKvaEK6I5Wvb9PrPBjC3f2fG4ElSO2ooFn2F/ prEH07x6EaPHTOpmb6ouCni0/DAc6I3cA5lXnHjamkBkxw55xJH2m1JE/U9EOBJ6Auyi KLXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p35Gl/yr"; spf=pass (google.com: domain of linux-kernel+bounces-26333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r19-20020a0ce293000000b0067fbb92fe95si8195170qvl.377.2024.01.15.09.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 09:57:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p35Gl/yr"; spf=pass (google.com: domain of linux-kernel+bounces-26333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26333-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6303C1C21E9D for ; Mon, 15 Jan 2024 17:57:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FD0A182A0; Mon, 15 Jan 2024 17:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p35Gl/yr" 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 96D4618AE0; Mon, 15 Jan 2024 17:57:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7B96C433C7; Mon, 15 Jan 2024 17:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705341443; bh=thBhnHt9jZFGQePPNqkyQjdjPMKZmxdsMlzWKPj8+Jc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p35Gl/yrY53OdCBI06PlYbOCPu8PAdffbIyGPu1B+JJ8LCI4uLoO8zCBoPhEbZDLS 2IuoXD/t8k77ozhb8mPOLhbNFyEP4GY8mx1XWU4y7yBIbDXxNC5TLZcXn4YQydXZb+ ihr5kYCGinap2g3Ra56/Q9Wdrh9KoWNBTljTqqTGVPXMUstYfVTqYHhmmbvqbuBaqQ R0D0wrr1HgN2cQjEjJrRRpn7IK2XvNg/wtd9MvHtZWsxwRCZJ8BWJdfLf157zF8Ife iEtCOl9+pCW2cWVL5OumkEzSAdDC5KxaFB7NfQJIEp+JhKI5bT6ZCPEyvbkuFrYfyK obT1KF8SeUyhQ== Date: Mon, 15 Jan 2024 11:57:20 -0600 From: Rob Herring To: Stephen Boyd Cc: 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: <20240115175720.GA1017185-robh@kernel.org> References: <20240112200750.4062441-1-sboyd@kernel.org> <20240112200750.4062441-2-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: <20240112200750.4062441-2-sboyd@kernel.org> 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. If > there isn't a valid initial_boot_params dtb then unflatten_device_tree() > returns early. There's always a valid DTB because that's the boot params even for ACPI systems. This does also create a userspace visible change that /proc/device-tree will be populated. I don't see an issue with that. There was worry when ACPI was added that systems would pass both DT and ACPI tables and that the kernel must only use ACPI. That was more to force ACPI adoption, but I'm not sure if that actually exists in any early system. I think we're past forcing adoption now. > Cc: Rob Herring > Cc: Frank Rowand > Cc: Catalin Marinas > Cc: Will Deacon > Cc: > Signed-off-by: Stephen Boyd > --- > arch/arm64/kernel/setup.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c > index 417a8a86b2db..ede3d59dabf0 100644 > --- a/arch/arm64/kernel/setup.c > +++ b/arch/arm64/kernel/setup.c > @@ -351,8 +351,7 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) > /* Parse the ACPI tables for possible boot-time configuration */ > acpi_boot_table_init(); > > - if (acpi_disabled) > - unflatten_device_tree(); > + unflatten_device_tree(); > > bootmem_init(); > > -- > https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ > https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git >