From: Frank Rowand <frowand.list@gmail.com>
To: Saravana Kannan <saravanak@google.com>,
Rob Herring <robh+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kernel test robot <lkp@intel.com>,
kernel-team@android.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] of/platform: Unconditionally pause/resume sync state during kernel init
Date: Sat, 7 Dec 2019 22:53:10 -0600 [thread overview]
Message-ID: <e6e9aa38-1a77-03e4-f245-58bcfd60ffa2@gmail.com> (raw)
In-Reply-To: <20191207010307.56529-1-saravanak@google.com>
On 12/6/19 7:03 PM, Saravana Kannan wrote:
> Commit 5e6669387e22 ("of/platform: Pause/resume sync state during init
> and of_platform_populate()") paused/resumed sync state during init only
> if Linux had parsed and populated a devicetree.
>
I _think_ (but I have not actually checked the code) that enabling unittests
is not the only way that of_root can be changed from NULL (thus changing
the value returned by of_have_populated_dt()). I _think_ that applying
an overlay on top of an empty devicetree will have the same result. So
I would change the following paragraph:
> However, the check for that (of_have_populated_dt()) can change between
> initcall levels when device tree unittests are enabled. This causes an
> unmatched pause/resume of sync state. To avoid this, just
> unconditionally pause/resume sync state during init.
to something like:
However, the check for that (of_have_populated_dt()) can change
after of_platform_default_populate_init() executes. One example
of this is when devicetree unittests are enabled. This causes an
nmatched pause/resume of sync state. To avoid this, just
unconditionally pause/resume sync state during init.
>
> Fixes: 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> ---
> drivers/of/platform.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index d93891a05f60..3371e4a06248 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -518,10 +518,11 @@ static int __init of_platform_default_populate_init(void)
> {
> struct device_node *node;
>
> + device_links_supplier_sync_state_pause();
> +
> if (!of_have_populated_dt())
> return -ENODEV;
>
> - device_links_supplier_sync_state_pause();
> /*
> * Handle certain compatibles explicitly, since we don't want to create
> * platform_devices for every node in /reserved-memory with a
> @@ -545,8 +546,7 @@ arch_initcall_sync(of_platform_default_populate_init);
>
> static int __init of_platform_sync_state_init(void)
> {
> - if (of_have_populated_dt())
> - device_links_supplier_sync_state_resume();
> + device_links_supplier_sync_state_resume();
> return 0;
> }
> late_initcall_sync(of_platform_sync_state_init);
>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
prev parent reply other threads:[~2019-12-08 4:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-07 1:03 [PATCH v1] of/platform: Unconditionally pause/resume sync state during kernel init Saravana Kannan
2019-12-08 4:53 ` Frank Rowand [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=e6e9aa38-1a77-03e4-f245-58bcfd60ffa2@gmail.com \
--to=frowand.list@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
/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 NNTP newsgroup(s).