Skip to content

PM / Domains: Fix race conditions during boot

Kevin Hilman linux-arm-kernel linux-pm linux-samsung-soc 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/21 of 9 patches 0 repliesNew
  2. v3 posting 1/20 of 9 patches 0 repliesSuperseded
  3. v2 posting 2/20 of 4 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v2 posting 1/20 of 4 patches0 repliesSuperseded

1 of 9 patches is in this archive. The cover letter announces 9.

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
4/9drivercore / platform: Keep PM domain powered during ->probe()+0 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/9] PM / Domains: Fix race conditions during boot
Quoted 16 lines · Mark Brown
Quoted 14 lines · Kevin Hilman
Quoted 10 lines · Ulf Hansson

There may be more than one device in a PM domain which then will be probed at different points in time.

Depending on timing and runtime PM support, in for the device related driver/subsystem, a PM domain may be advised to power off after a successful probe sequence.

A general requirement for a device within a PM domain, is that the PM domain must stay powered during the probe sequence. To cope with such requirement, let's add two new APIs, dev_pm_domain_get|put().

I'm confused. Why arent' pm_runtime_get*() and pm_runtime_put*() working?

Quoted 8 lines
Quoted 2 lines

What's not explained here (or what I'm not understanding) is why a PM domain is powering off if it has active devices.

The issue AIUI is what happens during system boot - if one device in a domain probes and marks itself runtime idle then that will trigger domain powerdown even if there is another device in the domain that hasn't yet been probed. This can cause undesirable glitches (or worse) during boot depending on what's getting powered down.

I'm not quite seeing how this series fixes that problem.

Looking at platform devices in PATCH 4/9, the new _get() and _put() are still happening around ->probe(), so if a platform device runtime suspends after probe, don't we still have a PM domain that can turn off?

Kevin