Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229408

[PATCH v6 21/22] driver core: Start processing deferred probes earlier

From Tomeu Vizoso <tomeu.vizoso@collabora.com>
Newsgroups linux.kernel
Subject [PATCH v6 21/22] driver core: Start processing deferred probes earlier
Date 2015-09-21 16:10 +0200
Message-ID <qb9X6-rF-71@gated-at.bofh.it> (permalink)
References <qb9X3-rF-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Some initcalls in the late level assume that some devices will have
already probed without explicitly checking for that.

After the recent move to defer most device probes when they are
registered, pressure increased in the late initcall level.

By starting the processing of the deferred queue in device_initcall_sync
we increase the chances that the initcalls mentioned before will find
the devices they depend on to have already probed.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---

Changes in v4:
- Start processing deferred probes in device_initcall_sync

 drivers/base/dd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 269ea76c1a4f..f0ef9233fcd6 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -176,7 +176,7 @@ static void driver_deferred_probe_trigger(void)
  *
  * We don't want to get in the way when the bulk of drivers are getting probed.
  * Instead, this initcall makes sure that deferred probing is delayed until
- * late_initcall time.
+ * device_initcall_sync time.
  */
 static int deferred_probe_initcall(void)
 {
@@ -190,7 +190,7 @@ static int deferred_probe_initcall(void)
 	flush_workqueue(deferred_wq);
 	return 0;
 }
-late_initcall(deferred_probe_initcall);
+device_initcall_sync(deferred_probe_initcall);
 
 static void driver_bound(struct device *dev)
 {
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/22] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 14/22] usb: phy: Probe phy devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 09/22] drm: Probe panels on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 12/22] pwm: Probe PWM chip devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 01/22] driver core: handle -EPROBE_DEFER from bus_type.match() Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 15/22] clk: Probe clk providers on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 19/22] power-supply: Probe power supplies on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 20/22] driver core: Allow deferring probes until late init Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 16/22] pinctrl: Probe pinctrl devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 17/22] phy: core: Probe phy providers on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 21/22] driver core: Start processing deferred probes earlier Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:10 +0200
  [PATCH v6 07/22] regulator: core: Remove regulator_list Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
    Re: [PATCH v6 07/22] regulator: core: Remove regulator_list Mark Brown <broonie@kernel.org> - 2015-09-21 21:40 +0200
      Re: [PATCH v6 07/22] regulator: core: Remove regulator_list Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-22 09:30 +0200
  [PATCH v6 02/22] ARM: amba: Move reading of periphid to amba_match() Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
  [PATCH v6 04/22] of: add function to allow probing a device from a OF node Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
  [PATCH v6 05/22] gpio: Probe GPIO drivers on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
  [PATCH v6 11/22] i2c: core: Probe i2c adapters and devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200
  [PATCH v6 06/22] gpio: Probe pinctrl devices on demand Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-09-21 16:20 +0200

csiph-web