projects/linux·commit 02ef7d39

Merge tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

02ef7d39 · Linus Torvalds <[email protected]> · 2023-03-17 11:02:26 -07:00

Pull power management fixes from Rafael Wysocki:
 "These fix an error code path issue in a cpuidle driver and make the
  sleepgraph utility more robust against unexpected input.

  Specifics:

   - Fix the psci_pd_init_topology() failure path in the PSCI cpuidle
     driver (Shawn Guo)

   - Modify the sleepgraph utility so it does not crash on binary data
     in device names (Todd Brandt)"

* tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  pm-graph: sleepgraph: Avoid crashing on binary data in device names
  cpuidle: psci: Iterate backwards over list in psci_pd_remove()
Commit
02ef7d39fd552cf9e1de58a3003f77e743d1fb6b
Parents
abb02a82 · 1fa9d47b

Merge commit. Changes below are compared with the first parent: abb02a82.

Changes

2 files changed · +4 −4

drivers/cpuidle/cpuidle-psci-domain.c

View file
diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c
index 6ad2954..11316c3 100644
--- a/drivers/cpuidle/cpuidle-psci-domain.c
+++ b/drivers/cpuidle/cpuidle-psci-domain.c
@@ -106,7 +106,8 @@ static void psci_pd_remove(void)
struct psci_pd_provider *pd_provider, *it;
struct generic_pm_domain *genpd;
- list_for_each_entry_safe(pd_provider, it, &psci_pd_providers, link) {
+ list_for_each_entry_safe_reverse(pd_provider, it,
+ &psci_pd_providers, link) {
of_genpd_del_provider(pd_provider->node);
genpd = of_genpd_remove_last(pd_provider->node);

tools/power/pm-graph/sleepgraph.py

View file
diff --git a/tools/power/pm-graph/sleepgraph.py b/tools/power/pm-graph/sleepgraph.py
index 82c09cd..bf4ac24 100755
--- a/tools/power/pm-graph/sleepgraph.py
+++ b/tools/power/pm-graph/sleepgraph.py
@@ -5556,9 +5556,8 @@ def executeSuspend(quiet=False):
if not quiet:
pprint('CAPTURING TRACE')
op = sv.writeDatafileHeader(sv.ftracefile, testdata)
- fp = open(tp+'trace', 'r')
- for line in fp:
- op.write(line)
+ fp = open(tp+'trace', 'rb')
+ op.write(ascii(fp.read()))
op.close()
sv.fsetVal('', 'trace')
sv.platforminfo(cmdafter)