From: Stephen Boyd <sboyd@kernel.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
David Gow <davidgow@google.com>,
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 <frowand.list@gmail.com>,
Brendan Higgins <brendan.higgins@linux.dev>
Subject: Re: [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded
Date: Thu, 15 Feb 2024 13:57:39 -0800 [thread overview]
Message-ID: <3e67766fa85be7dd865c5ec9dea1b53b.sboyd@kernel.org> (raw)
In-Reply-To: <CAL_JsqLrRXdPZ+u9XG960V7sXECBi5Ko7BYdreftYz-O=Hwieg@mail.gmail.com>
Quoting Rob Herring (2024-02-13 09:52:00)
> On Fri, Feb 9, 2024 at 8:59 PM Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > ---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 <linux/jump_label.h>
> > #include <linux/kcsan.h>
> > #include <linux/init_syscalls.h>
> > +#include <linux/of.h>
> > +#include <linux/of_fdt.h>
> > #include <linux/stackdepot.h>
> > #include <linux/randomize_kstack.h>
> > #include <net/net_namespace.h>
> > @@ -895,6 +897,8 @@ void start_kernel(void)
> > pr_notice("%s", linux_banner);
> > early_security_init();
> > setup_arch(&command_line);
> > + if (!of_root)
>
> of_root is another thing I'd like to remove direct access to. That
> check could be inside unflatten_device_tree().
Ok.
>
> > + unflatten_device_tree();
>
> That's back to what Frank had essentially and I wanted to avoid.
Alright, fair enough.
>
> I think I'd just disable the tests on the above arches and let them
> opt-in. I could be convinced otherwise though.
>
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=n. 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().
prev parent reply other threads:[~2024-02-15 21:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 19:59 [PATCH v3 0/7] of: populate of_root node if bootloader doesn't Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 1/7] of: Always unflatten in unflatten_and_copy_device_tree() Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 2/7] of: Create of_root if no dtb provided by firmware Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 3/7] um: Unconditionally call unflatten_device_tree() Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 4/7] x86/of: Unconditionally call unflatten_and_copy_device_tree() Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 5/7] arm64: Unconditionally call unflatten_device_tree() Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 6/7] of: unittest: treat missing of_root as error instead of fixing up Stephen Boyd
2024-02-02 19:59 ` [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded Stephen Boyd
2024-02-03 4:10 ` David Gow
2024-02-05 19:19 ` Stephen Boyd
2024-02-05 19:55 ` Geert Uytterhoeven
2024-02-10 2:59 ` Stephen Boyd
2024-02-13 17:52 ` Rob Herring
2024-02-15 21:57 ` Stephen Boyd [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=3e67766fa85be7dd865c5ec9dea1b53b.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=geert@linux-m68k.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=patches@lists.linux.dev \
--cc=robh+dt@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).