linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: manjugk@ti.com (G, Manjunath Kondaiah)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3] drivercore: Add driver probe deferral mechanism
Date: Wed, 5 Oct 2011 00:05:16 +0530	[thread overview]
Message-ID: <20111004183516.GB8021@manju-desktop> (raw)
In-Reply-To: <CACxGe6tXEx1A+ZuBTUdi8jjfx_hOCaX6eSpUOOhNH9us+Mnczg@mail.gmail.com>

On Tue, Oct 04, 2011 at 09:58:10AM -0600, Grant Likely wrote:
> On Tue, Oct 4, 2011 at 8:51 AM, G, Manjunath Kondaiah <manjugk@ti.com> wrote:
> > On Thu, Sep 22, 2011 at 12:51:23PM -0600, Grant Likely wrote:
> >> Hi Manjunath,
> >>
> >> Here's the current state of the patch. ?The major think that needs to
> >> be done is to convert it to use a separate workqueue as described in
> >> the TODO above. ?It also needs some users adapted to it. ?One of the
> >> gpio drivers would work; preferably one of the newer drivers that
> >> doesn't have a lot of drivers depending on the early_initcall()
> >> behaviour yet.
> >
> > I have tested this patch on omap3 beagle board by making:
> > 1. omap-gpio driver init as late_initcall instead of postcore_initcall
> > 2. mmc driver probe will request gpio through gpio_request and gpio driver
> > returns -EDEFER_PROBE which in turn makes mmc driver to request deferral probe.
> > 3. When deferral probe gets activated, it scans driver entries and it will not
> > find any match for mmc driver probe.
> 
> Looks like drivers/mmc/host/omap.c is using platform_driver_probe()
> instead of platform_driver_register().  Add the probe hook to the
> platform_driver structure and change it to call
> platform_driver_register() and it should work.  Don't forget to change
> mmc_omap_probe from __init to __devinit.

Yes. After changing it into platform_driver_register, I can see mmc probe is
getting completed from deferred probe list. But, MMC upper layer will check 
probe and it waits for ever since probe_count is not getting incremented.

Log:

[    1.807830] platform omap_hsmmc.0: Driver omap_hsmmc requests probe deferral

...

[    1.948760] omap_device: omap_gpio.0: new worst case activate latency 0:30517
[    1.959259] OMAP GPIO hardware version 2.5

...

[    2.000488] platform omap_hsmmc.0: Retrying from deferred list
[    2.008026] omap_device: omap_hsmmc.0: new worst case activate latency 0:244140
[    2.020080] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[    2.035827] omap_hsmmc omap_hsmmc.0: Probe success...
[    2.042083] twl_rtc twl_rtc: setting system clock to 2000-01-01 01:06:35 UTC
(946688795)
[    2.056030] Waiting for root device /dev/mmcblk0p2...
[    2.061492] driver_probe_done: probe_count = 0
[    2.168518] driver_probe_done: probe_count = 0
[    2.277832] driver_probe_done: probe_count = 0
[    2.387207] driver_probe_done: probe_count = 0
[    2.496582] driver_probe_done: probe_count = 0

Waits for ever in init/do_mount.c:
	if ((ROOT_DEV == 0) && root_wait) {
		printk(KERN_INFO "Waiting for root device %s...\n",
			saved_root_name);
		while (driver_probe_done() != 0 ||
			(ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
			msleep(100);
		async_synchronize_full();
	}

-Manjunath

  reply	other threads:[~2011-10-04 18:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 18:51 [RFC PATCH v3] drivercore: Add driver probe deferral mechanism Grant Likely
2011-09-22 18:58 ` Joe Perches
2011-09-22 20:29 ` Alan Cox
2011-09-22 21:19   ` Grant Likely
2011-09-23 17:50     ` Valdis.Kletnieks at vt.edu
2011-09-23 23:18       ` Grant Likely
     [not found]   ` <4E7BA661.7070903@cavium.com>
2011-09-22 22:47     ` Alan Cox
2011-09-23  5:02       ` Grant Likely
2011-09-23 16:55       ` David Daney
2011-09-26 14:16 ` Mark Brown
2011-09-26 15:12   ` Russell King - ARM Linux
2011-09-26 15:26     ` Mark Brown
2011-09-26 15:48       ` Grant Likely
2011-09-27 13:50         ` Arnd Bergmann
2011-09-27 21:08           ` Grant Likely
2011-09-27 22:13             ` Mark Brown
2011-09-28 13:04               ` Arnd Bergmann
2011-09-28 13:20                 ` Mark Brown
2011-09-28 23:14               ` Grant Likely
2011-09-29 11:00                 ` Mark Brown
2011-10-03 23:02 ` Kevin Hilman
2011-10-04 15:52   ` Grant Likely
2011-10-04 14:51 ` G, Manjunath Kondaiah
2011-10-04 15:58   ` Grant Likely
2011-10-04 18:35     ` G, Manjunath Kondaiah [this message]
2011-10-04 23:35       ` Grant Likely
2011-10-07  3:31         ` G, Manjunath Kondaiah
2011-10-11 20:47 ` Andrew Morton
     [not found]   ` <4E94B01D.2050402@cavium.com>
2011-10-13  4:19     ` Grant Likely

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=20111004183516.GB8021@manju-desktop \
    --to=manjugk@ti.com \
    --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).