From: skannan@codeaurora.org (Saravana Kannan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] driver core: Add API to wait for deferred probe to complete during init
Date: Thu, 09 May 2013 11:12:24 -0700 [thread overview]
Message-ID: <518BE708.8040005@codeaurora.org> (raw)
In-Reply-To: <CACxGe6vPHsyacOkyJb9UGCdqPsYbW90sGG8HcZOZ0mJrV7QWkA@mail.gmail.com>
On 05/09/2013 11:09 AM, Grant Likely wrote:
> On Thu, May 9, 2013 at 5:52 PM, Saravana Kannan <skannan@codeaurora.org> wrote:
>> On 05/09/2013 04:50 AM, Grant Likely wrote:
>>>
>>> On Thu, May 9, 2013 at 11:07 AM, Ming Lei <tom.leiming@gmail.com> wrote:
>>>>
>>>> On Thu, May 9, 2013 at 1:18 PM, Saravana Kannan <skannan@codeaurora.org>
>>>> wrote:
>>>>>
>>>>>
>>>>> The most obvious fallback of using late_initcall_sync() also doesn't
>>>>> work
>>>>> since the deferred probing work initated during late_initcall() is done
>>>>> in
>>>>> a workqueue. So, frameworks that want to wait for all devices to finish
>>>>> probing during init will now have to wait for the deferred workqueue to
>>>>> finish it's work. This patch adds a wait_for_init_deferred_probe_done()
>>>>> API
>>>>
>>>>
>>>> flush_workqueue() has been added in deferred_probe_initcall(), so looks
>>>> it
>>>> should be OK for your problem, doesn't it?
>>>
>>>
>>> It looks like Saravana is using a kernel that already does that based
>>> on object bb5645e from the diff. So if he is still having problem,
>>> then there is probably another deferred probe that is triggered after
>>> the deferred probe lateinitcall is executed. It would be good to know
>>> what driver is getting deferred past clearing the queue. Or has this
>>> been rebased from an earlier kernel? It may no longer be necessary.
>>
>>
>> Sorry, it was mindless rebase late at night. I missed the addition of the
>> flush_workqueue(). That takes care of my immediate needs. Sorry for wasting
>> your time.
>>
>> But the other patches to move clock and regulator calls to late_init_sync
>> should still be necessary. Right? Or are we going to depend on the Makefile
>> ordering to determine the order of the lateinit calls? (I would rather not).
>
> You'll need to make sure the regulator and clocks defer to after all
> the late initcalls are complete. That will ensure that the deferred
> queue has been processed.
>
Ok, then I guess I'll still need to send out the other 2 patches.
-Saravana
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-05-09 18:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 5:18 [PATCH 0/3] Fix disable of unused clk/regulator with deferred probe Saravana Kannan
2013-05-09 5:18 ` [PATCH 1/3] driver core: Add API to wait for deferred probe to complete during init Saravana Kannan
2013-05-09 10:07 ` Ming Lei
2013-05-09 11:50 ` Grant Likely
2013-05-09 13:50 ` Mark Brown
2013-05-09 14:14 ` Russell King - ARM Linux
2013-05-09 14:37 ` Mark Brown
2013-05-09 15:07 ` Russell King - ARM Linux
2013-05-09 15:43 ` Mark Brown
2013-05-09 18:39 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-09 16:39 ` Grant Likely
2013-05-10 9:30 ` Mark Brown
2013-05-09 16:52 ` Saravana Kannan
2013-05-09 18:09 ` Grant Likely
2013-05-09 18:12 ` Saravana Kannan [this message]
2013-05-09 14:32 ` Ming Lei
2013-05-09 5:18 ` [PATCH 2/3] clk: Disable unused clocks after deferred probing is done Saravana Kannan
2013-05-09 5:18 ` [PATCH 3/3] regulator: core: Disable unused regulators " Saravana Kannan
2013-05-09 18:35 ` [PATCH v2 1/2] clk: Disable unused clocks " Saravana Kannan
2013-05-09 18:35 ` [PATCH 2/2] regulator: core: Disable unused regulators " Saravana Kannan
2013-05-10 6:45 ` [PATCH v2 1/2] clk: Disable unused clocks " Jean-Christophe PLAGNIOL-VILLARD
2013-05-10 23:03 ` Saravana Kannan
2013-05-22 10:35 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-16 4:34 ` Saravana Kannan
2013-05-16 12:55 ` Ulf Hansson
2013-05-16 19:23 ` Saravana Kannan
2013-05-29 7:51 ` Mike Turquette
2013-05-30 1:46 ` Saravana Kannan
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=518BE708.8040005@codeaurora.org \
--to=skannan@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).