- Move the unused cleanup to a _sync initcall
 
 Providers:
  - mediatek: Fix race conditions at probe/remove with genpd
  - renesas: r8a77980-sysc: CR7 must be always on
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmXGG0wXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCmRnQ//RpMQM2QUJQD5u3LQc5+i3eXJ
 YnnOXPfExstgV+2UbkDqTe0v8cKU/RFLj/RL/nWhQl669QIFrL+jzlJw63ty7oDH
 ocZ8sZo6pzHzjQE1KS3LJ5OKAkHC34S8I9EZDMfTLUXaaVTYkXerXbIrH/NXirEZ
 cghm15cRyoIytHZWOOyRcug7bN2RO/U7ebcT/ytruMzsS7Rx/m3Fvrfny1GPDbdp
 74WszNncl/r+Q4wwWSO2JjU6gOkHuWhHtUax5GZ9H2tdDPL+xDN9Ad3pLnuUYTkT
 XKixIjsxDG2TLxMKqUWHqo8WCDDnjFvE7m0UakrssDntLd6rIrBD8HTbhCqPlfh4
 an4k5/7HR5M4ghY0QoSZPoTPEmovn64u2IqGidl/AQ20EL/yTlJcn7i5lKK8oK2P
 buZg6kf850mQxU7LWdF9dcbHeVM5wrU5Z/ZnPbK6s76+kH94wtjk2gBVvy9IKLjo
 JjqbqdkzorJ/XlOqJMsVtAyNZ9F8kq4eAh51jw4TjQlsJtWO5mzkiP3DD2WRNKDF
 4jV75P28mX6V1YP8fKllWqX8ldreLbz+0qRBLrKoDAVEIFzogQFF5/4LXK1Nn/xz
 mLQq3Z2gs1z7QKjuPyBY4qvXYbCqKJ5CoGlIoTPrJoGZ5L/hZZ/oHdMOfP9nrafN
 OWcq7Qn2kHmltT746Tg=
 =1Krz
 -----END PGP SIGNATURE-----

Merge tag 'pmdomain-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

Pull pmdomain fixes from Ulf Hansson:
 "Core:
   - Move the unused cleanup to a _sync initcall

  Providers:
   - mediatek: Fix race conditions at probe/remove with genpd
   - renesas: r8a77980-sysc: CR7 must be always on"

* tag 'pmdomain-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: mediatek: fix race conditions with genpd
  pmdomain: renesas: r8a77980-sysc: CR7 must be always on
  pmdomain: core: Move the unused cleanup to a _sync initcall
This commit is contained in:
Linus Torvalds 2024-02-09 10:29:50 -08:00
commit 3760081ff4
3 changed files with 10 additions and 10 deletions

View File

@ -1109,7 +1109,7 @@ static int __init genpd_power_off_unused(void)
return 0;
}
late_initcall(genpd_power_off_unused);
late_initcall_sync(genpd_power_off_unused);
#ifdef CONFIG_PM_SLEEP

View File

@ -561,6 +561,11 @@ static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *paren
goto err_put_node;
}
/* recursive call to add all subdomains */
ret = scpsys_add_subdomain(scpsys, child);
if (ret)
goto err_put_node;
ret = pm_genpd_add_subdomain(parent_pd, child_pd);
if (ret) {
dev_err(scpsys->dev, "failed to add %s subdomain to parent %s\n",
@ -570,11 +575,6 @@ static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *paren
dev_dbg(scpsys->dev, "%s add subdomain: %s\n", parent_pd->name,
child_pd->name);
}
/* recursive call to add all subdomains */
ret = scpsys_add_subdomain(scpsys, child);
if (ret)
goto err_put_node;
}
return 0;
@ -588,9 +588,6 @@ static void scpsys_remove_one_domain(struct scpsys_domain *pd)
{
int ret;
if (scpsys_domain_is_on(pd))
scpsys_power_off(&pd->genpd);
/*
* We're in the error cleanup already, so we only complain,
* but won't emit another error on top of the original one.
@ -600,6 +597,8 @@ static void scpsys_remove_one_domain(struct scpsys_domain *pd)
dev_err(pd->scpsys->dev,
"failed to remove domain '%s' : %d - state may be inconsistent\n",
pd->genpd.name, ret);
if (scpsys_domain_is_on(pd))
scpsys_power_off(&pd->genpd);
clk_bulk_put(pd->num_clks, pd->clks);
clk_bulk_put(pd->num_subsys_clks, pd->subsys_clks);

View File

@ -25,7 +25,8 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = {
PD_CPU_NOCR },
{ "ca53-cpu3", 0x200, 3, R8A77980_PD_CA53_CPU3, R8A77980_PD_CA53_SCU,
PD_CPU_NOCR },
{ "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON },
{ "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON,
PD_CPU_NOCR },
{ "a3ir", 0x180, 0, R8A77980_PD_A3IR, R8A77980_PD_ALWAYS_ON },
{ "a2ir0", 0x400, 0, R8A77980_PD_A2IR0, R8A77980_PD_A3IR },
{ "a2ir1", 0x400, 1, R8A77980_PD_A2IR1, R8A77980_PD_A3IR },