Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp734921rdb; Thu, 15 Feb 2024 13:57:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXbwL78wgREmdyFZcakyqVE+UN1Cv3nlgNFSbEg1AJxxSN7lJ2zd7gPPHfsRt7qKS++VLG+Ukg1JRN0iqBirjMjuEo4qyMysi24gqGJQQ== X-Google-Smtp-Source: AGHT+IEcK0GGrHoR++9Ajx4LYsa3EWc2qnLKhffVEUAVpBkA6wzhDdXBqpzSzaqytxgTrgaXhvnZ X-Received: by 2002:a05:620a:2487:b0:787:2269:b07 with SMTP id i7-20020a05620a248700b0078722690b07mr4034964qkn.34.1708034269368; Thu, 15 Feb 2024 13:57:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708034269; cv=pass; d=google.com; s=arc-20160816; b=N2Lb6cg9augDJZCEdAaZDMsXI1dIhkVgsT4LAOiRRhQQmAh2ReSrTrX+aX2FjQNE3n nBcBK8IZ/iIa2onlFKidmJCMvnAZjEN+uPEHu+2fGwBD7pjllkMqLPJEj99voGzuEgbt WWbJD6VEEawngoKpLR29ez8vkQEXrJDChok1zikM8I4T02qvh/jCa6EkdF7vTLfu4Tif n0wUlT9GU6k777vmUjPlSP+eHzZ8OBVRJnbJ4vi5fjlvngbsupZZjaC2lvCVN4URYotR TuKhcdofh5rS43ePzF/fGVGOdnFy5yHkls2w3REeAtdvAIqQspNhfczGkWWpYaC+Zh9Q UnKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=W8FAYdoi1ZheQkPrRNKVraB559xRrkBih6/hUdhUKI0=; fh=zPlNV02qgiH27Ka4MNC1c4cpgY2pGv6+bGnD6iZah/0=; b=p028Cd16sb4A/RdfrsrmSeJ0nPXVqHbhfkfb/F3xLc1xEbV/qukZejrlAFWHFFAfHB h5vDpqNM+f0yER7wYyXdGA6880GpFUoUzJMoIa4duK3NCE9nCVMyt2oQMGM6qkA1/Zd3 NjZJSKG97vLxCywXZ39H5n+z05t5IsoiL/XZ0bgzOwsSjDa8mfNfLDGAPoKf5G+2VjR5 wr2qAbzk3ds1jhGW4g48V3GT6or60/aVG8JQzvKfu6lj2vlCgkHubP9ToZF6UMdhxLTY nbgv5Buywp9CiussfB49iYV31l/1/wodxzKmqLqtF1SQGV1wGI1oVfimUZxucXbH5SKJ PrJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HKqLNhPX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67718-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67718-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 qs14-20020a05620a394e00b00783daad165fsi2674508qkn.400.2024.02.15.13.57.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 13:57:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67718-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=HKqLNhPX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67718-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67718-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 239511C20A4A for ; Thu, 15 Feb 2024 21:57:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27B2B1420DB; Thu, 15 Feb 2024 21:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HKqLNhPX" 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 3E0EE13DB92; Thu, 15 Feb 2024 21:57:42 +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=1708034262; cv=none; b=LtGkANG199WfhTgJa1UIHMSrsgLkqRwFOGr5Lgb32SUgIGiVyBc8EMUcoEqUb47j2cSPC7R+oSwcm678nWZkVK09B+dr/D5ZSI9Y4jtuY9mQ1sJWM/QSQEUoQzuXpjJHZIQTvKj59vqUyCbA0ZO/HvscRQ/6XFn9bIbCzLsbPq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034262; c=relaxed/simple; bh=T7MZeg+yLjaU4BtqowdnnpbuIdHLYtXGFMcH9SwnC3o=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=V6WopTJ0krUuKlWeei1EOXn0xfBWd+xIMww7Tp8uhiYJVvg74Y3mNb5Tq4Au4jo7CmvibuVnsFCCzImsKL0Z5gk41WISfzb6w1Tx3XfQEgd1ia+JBQYKQy6poW1hAk/Twd3BhXLdDpUXcY94g4/mCmstIhFu5h7RibjgJeGClRQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HKqLNhPX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F234FC433C7; Thu, 15 Feb 2024 21:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708034262; bh=T7MZeg+yLjaU4BtqowdnnpbuIdHLYtXGFMcH9SwnC3o=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=HKqLNhPXnNKvbiW3EkbP1vnJu/P3vG86/ySfYdF3/dkJRvBlKdC16LT5mZItEadLZ 598aG+3ah3tkmZLOIrdMCA71Mv1dhqn/X9wN6XZE2PFnEQ6u9ytiCXPexNV6EfMqDL +S/VfoHHM1M1sW6VN+xeXqAf7GACRVuBldgxHQqrhOn1ISIO28LWtV2GGCUmEB3zYg LhUL9oistI6vrDdKAo/sunUbQYDUYBQ9qCuFzIPCyK9fbnmogWsbeD7/IbCkVRVYdg ZDB69vXMxMVXPPwP5isAT3K/QDz1xP57NY8LETK4c19bJ9dWpvu+gdz4RikrKAAj9r WXx8+d2ecNk+g== Message-ID: <3e67766fa85be7dd865c5ec9dea1b53b.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20240202195909.3458162-1-sboyd@kernel.org> <20240202195909.3458162-8-sboyd@kernel.org> <89892ecd6b1b043db58258705c32b02b.sboyd@kernel.org> <2185a3cc3152a0b9a94b0c64353bc9a1.sboyd@kernel.org> Subject: Re: [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded From: Stephen Boyd Cc: Geert Uytterhoeven , David Gow , 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 , Brendan Higgins To: Rob Herring Date: Thu, 15 Feb 2024 13:57:39 -0800 User-Agent: alot/0.10 Quoting Rob Herring (2024-02-13 09:52:00) > On Fri, Feb 9, 2024 at 8:59=E2=80=AFPM Stephen Boyd wr= ote: > > > > ---8<--- > > diff --git a/init/main.c b/init/main.c > > index e24b0780fdff..02f5cf8be6c1 100644 > > --- a/init/main.c > > +++ b/init/main.c > > @@ -97,6 +97,8 @@ > > #include > > #include > > #include > > +#include > > +#include > > #include > > #include > > #include > > @@ -895,6 +897,8 @@ void start_kernel(void) > > pr_notice("%s", linux_banner); > > early_security_init(); > > setup_arch(&command_line); > > + if (!of_root) >=20 > of_root is another thing I'd like to remove direct access to. That > check could be inside unflatten_device_tree(). Ok. >=20 > > + unflatten_device_tree(); >=20 > That's back to what Frank had essentially and I wanted to avoid. Alright, fair enough. >=20 > I think I'd just disable the tests on the above arches and let them > opt-in. I could be convinced otherwise though. >=20 Kunit folks would prefer to skip tests when dependencies aren't satisfied. The OF_UNITTEST config already depends on !SPARC so perhaps it's simplest to have tests skip if OF_EARLY_FLATREE=3Dn. Then OF_EARLY_FLATREE can be def_bool OF && !(SPARC || M68K || other arches). The OF_UNITTEST config can depend on OF_EARLY_FLATREE instead of select it then. This way new supporting architectures can remove themselves from the def_bool line when they start calling unflatten_device_tree().