From: Sudeep Holla <sudeep.holla@arm.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] of: base: upgrade initcall level of of_init from core to pure
Date: Wed, 13 May 2015 11:03:50 +0100 [thread overview]
Message-ID: <55532186.5060803@arm.com> (raw)
In-Reply-To: <CAL_JsqJ19OfTJjtrZ9vs_9VYRHzOyF=GZdz4ftHT=nonEVWWgw@mail.gmail.com>
On 12/05/15 23:55, Rob Herring wrote:
> On Tue, May 12, 2015 at 12:38 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> Commit 5590f3196b29 ("drivers/core/of: Add symlink to device-tree from
>> devices with an OF node") adds the symlink `of_node` for each device
>> pointing to it's device tree node while creating/initialising it.
>>
>> However the devicetree sysfs is created and setup in of_init which is
>> executed at core_initcall level. For all the devices created at the core
>> initcall before of_init, the following error is thrown:
>> "Error -2(-ENOENT) creating of_node link"
>
> What devices have you seen the problem with? I'd rather see if those
> devices could now be moved later.
>
Yes that's exactly what I attempted first after seeing the issue, but
failed miserably due to the dependency mentioned below.
It's on vexpress platforms with the following initcall sequence:
1. core - vexpress system control registers block(sysreg)
2. postcore - vexpress configuration controllers(config-bridge)
3. arch - customize_machine->of_platform_populate
of_platform_populate creates amba_devices which need clocks and
depend on the vexpress-config and clocks which in turn depends on
vexpress-sysreg
I would like to know if with commit 5590f3196b29 are we mandating
all the device creation to be done only after core_initcall or
is it OK get the errors mentioned above and ignore them as harmless
as the comment in the code states:
"An error here doesn't warrant bringing down the device"
>> Since the core_initcall is the earliest point where devices get
>> registered, push initcall level of of_init from core to pure so that
>> the devicetree sysfs is ready before any devices are registered.
>
> Read the definition of pure:
>
> * A "pure" initcall has no dependencies on anything else, and purely
> * initializes variables that couldn't be statically initialized.
>
Yes I read and was bit hesitant initially to do this change, but found
no better way. I posted mainly to discuss other possibilities to solve
the issue.
Regards,
Sudeep
next prev parent reply other threads:[~2015-05-13 10:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 17:38 [PATCH] of: base: upgrade initcall level of of_init from core to pure Sudeep Holla
[not found] ` <1431452282-10207-1-git-send-email-sudeep.holla-5wv7dgnIgG8@public.gmane.org>
2015-05-12 22:55 ` Rob Herring
2015-05-13 10:03 ` Sudeep Holla [this message]
2015-05-13 13:46 ` Rob Herring
2015-05-13 14:50 ` Sudeep Holla
[not found] ` <555364AA.7030703-5wv7dgnIgG8@public.gmane.org>
2015-05-13 16:34 ` Rob Herring
2015-05-13 16:54 ` Sudeep Holla
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=55532186.5060803@arm.com \
--to=sudeep.holla@arm.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.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).