From c75b271856c8102b04771a8cfc7dcae1ef4b0bd8 Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Thu, 14 May 2020 22:35:00 -0700 Subject: [PATCH] FROMGIT: of: platform: Batch fwnode parsing when adding all top level devices The fw_devlink_pause() and fw_devlink_resume() APIs allow batching the parsing of the device tree nodes when a lot of devices are added. This will significantly cut down parsing time (as much a 1 second on some systems). So, use them when adding devices for all the top level device tree nodes in a system. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200515053500.215929-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 93d2e4322aa74c1ad1e8c2160608eb9a960d69ff https: //git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-next) Bug: 157691602 Signed-off-by: Saravana Kannan Change-Id: I6cc5b4eff7f85b0eb3b6c1c4d81418544a17f532 --- drivers/of/platform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 8b339f03a0ad..379544697aa3 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -545,7 +545,9 @@ static int __init of_platform_default_populate_init(void) } /* Populate everything else. */ + fw_devlink_pause(); of_platform_default_populate(NULL, NULL, NULL); + fw_devlink_resume(); return 0; }