Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e13d39a3 authored by Saravana Kannan's avatar Saravana Kannan Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: of/platform: Unconditionally pause/resume sync state during kernel init



Commit 5e6669387e22 ("of/platform: Pause/resume sync state during init
and of_platform_populate()") paused/resumed sync state during init only
if Linux had parsed and populated a devicetree.

However, the check for that (of_have_populated_dt()) can change after
of_platform_default_populate_init() executes.  One example of this is
when devicetree unittests are enabled.  This causes an unmatched
pause/resume of sync state. To avoid this, just unconditionally
pause/resume sync state during init.

Fixes: 5e6669387e22 ("of/platform: Pause/resume sync state during init and of_platform_populate()")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
Reviewed-by: default avatarFrank Rowand <frowand.list@gmail.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
(cherry picked from commit ee9b280e17dce51c44e1d04d11eb0a4acd0ee1a9)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Iba0f462bf45e056a03f3e925d8037db81cb517b2
parent 26d0b8dd
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -518,10 +518,11 @@ static int __init of_platform_default_populate_init(void)
{
{
	struct device_node *node;
	struct device_node *node;


	device_links_supplier_sync_state_pause();

	if (!of_have_populated_dt())
	if (!of_have_populated_dt())
		return -ENODEV;
		return -ENODEV;


	device_links_supplier_sync_state_pause();
	/*
	/*
	 * Handle certain compatibles explicitly, since we don't want to create
	 * Handle certain compatibles explicitly, since we don't want to create
	 * platform_devices for every node in /reserved-memory with a
	 * platform_devices for every node in /reserved-memory with a
@@ -547,7 +548,6 @@ arch_initcall_sync(of_platform_default_populate_init);


static int __init of_platform_sync_state_init(void)
static int __init of_platform_sync_state_init(void)
{
{
	if (of_have_populated_dt())
	device_links_supplier_sync_state_resume();
	device_links_supplier_sync_state_resume();
	return 0;
	return 0;
}
}