summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2023-04-12 15:58:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-01 08:23:24 +0900
commit0994aa001fde56d6fb4286c2493ea10b0e9a8de8 (patch)
tree745d009d026aab3a4eecd0d253de4f311b091ccc /drivers/base
parent3dcebcaa258c40cd3de7aed5a2a3a2ac64ac6440 (diff)
driver core: Don't require dynamic_debug for initcall_debug probe timing
commit e2f06aa885081e1391916367f53bad984714b4db upstream. Don't require the use of dynamic debug (or modification of the kernel to add a #define DEBUG to the top of this file) to get the printk message about driver probe timing. This printk is only emitted when initcall_debug is enabled on the kernel commandline, and it isn't immediately obvious that you have to do something else to debug boot timing issues related to driver probe. Add a comment too so it doesn't get converted back to pr_debug(). Fixes: eb7fbc9fb118 ("driver core: Add missing '\n' in log messages") Cc: stable <stable@kernel.org> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Brian Norris <briannorris@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20230412225842.3196599-1-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/dd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 9cbf086fe552..ab0b2eb5fa07 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -690,7 +690,12 @@ static int really_probe_debug(struct device *dev, struct device_driver *drv)
calltime = ktime_get();
ret = really_probe(dev, drv);
rettime = ktime_get();
- pr_debug("probe of %s returned %d after %lld usecs\n",
+ /*
+ * Don't change this to pr_debug() because that requires
+ * CONFIG_DYNAMIC_DEBUG and we want a simple 'initcall_debug' on the
+ * kernel commandline to print this all the time at the debug level.
+ */
+ printk(KERN_DEBUG "probe of %s returned %d after %lld usecs\n",
dev_name(dev), ret, ktime_us_delta(rettime, calltime));
return ret;
}