Skip to content

Commit

Permalink
of: platform: Batch fwnode parsing when adding all top level devices
Browse files Browse the repository at this point in the history
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 <saravanak@google.com>
Link: https://lore.kernel.org/r/20200515053500.215929-5-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Saravana Kannan authored and gregkh committed May 15, 2020
1 parent 716a7a2 commit 93d2e43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/of/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,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;
}
Expand Down

0 comments on commit 93d2e43

Please sign in to comment.