mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: patches@lists.linux.dev, devicetree@vger.kernel.org,
	Saravana Kannan <saravanak@google.com>,
	linux-kernel@vger.kernel.org, David Gow <davidgow@google.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-arm-kernel@lists.infradead.org,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH] of: Skip kunit tests when arm64+ACPI doesn't populate root node
Date: Thu, 10 Oct 2024 12:43:31 -0500	[thread overview]
Message-ID: <172858218311.2064946.5279211050619703517.robh@kernel.org> (raw)
In-Reply-To: <20241009204133.1169931-1-sboyd@kernel.org>


On Wed, 09 Oct 2024 13:41:31 -0700, Stephen Boyd wrote:
> A root node is required to apply DT overlays. A root node is usually
> present after commit 7b937cc243e5 ("of: Create of_root if no dtb
> provided by firmware"), except for on arm64 systems booted with ACPI
> tables. In that case, the root node is intentionally not populated
> because it would "allow DT devices to be instantiated atop an ACPI base
> system"[1].
> 
> Introduce an OF function that skips the kunit test if the root node
> isn't populated. Limit the test to when both CONFIG_ARM64 and
> CONFIG_ACPI are set, because otherwise the lack of a root node is a bug.
> Make the function private and take a kunit test parameter so that it
> can't be abused to test for the presence of the root node in non-test
> code.
> 
> Use this function to skip tests that require the root node. Currently
> that's the DT tests and any tests that apply overlays.
> 
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Closes: https://lore.kernel.org/r/6cd337fb-38f0-41cb-b942-5844b84433db@roeck-us.net
> Link: https://lore.kernel.org/r/Zd4dQpHO7em1ji67@FVFF77S0Q05N.cambridge.arm.com [1]
> Fixes: 893ecc6d2d61 ("of: Add KUnit test to confirm DTB is loaded")
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> ---
>  drivers/of/of_kunit_helpers.c | 15 +++++++++++++++
>  drivers/of/of_private.h       |  3 +++
>  drivers/of/of_test.c          |  3 +++
>  drivers/of/overlay_test.c     |  3 +++
>  4 files changed, 24 insertions(+)
> 

Applied, thanks!


      parent reply	other threads:[~2024-10-10 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 20:41 Stephen Boyd
2024-10-10  3:40 ` Guenter Roeck
2024-10-10 11:05 ` Mark Rutland
2024-10-10 17:43 ` Rob Herring (Arm) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172858218311.2064946.5279211050619703517.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=davidgow@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=patches@lists.linux.dev \
    --cc=saravanak@google.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®