Skip to content

Commit ee9b280

Browse files
Saravana Kannanrobherring
authored andcommitted
of/platform: Unconditionally pause/resume sync state during kernel init
Commit 5e66693 ("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: 5e66693 ("of/platform: Pause/resume sync state during init and of_platform_populate()") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Saravana Kannan <saravanak@google.com> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 70c8121 commit ee9b280

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/of/platform.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,11 @@ static int __init of_platform_default_populate_init(void)
518518
{
519519
struct device_node *node;
520520

521+
device_links_supplier_sync_state_pause();
522+
521523
if (!of_have_populated_dt())
522524
return -ENODEV;
523525

524-
device_links_supplier_sync_state_pause();
525526
/*
526527
* Handle certain compatibles explicitly, since we don't want to create
527528
* platform_devices for every node in /reserved-memory with a
@@ -545,8 +546,7 @@ arch_initcall_sync(of_platform_default_populate_init);
545546

546547
static int __init of_platform_sync_state_init(void)
547548
{
548-
if (of_have_populated_dt())
549-
device_links_supplier_sync_state_resume();
549+
device_links_supplier_sync_state_resume();
550550
return 0;
551551
}
552552
late_initcall_sync(of_platform_sync_state_init);

0 commit comments

Comments
 (0)