History

firmware/psci: Print a warning if PSCI doesn't accept PC mode

The function psci_pd_try_set_osi_mode() will print an error if enabling OSI mode fails. To ease debugging PSCI issues print corresponding message if switching to PC mode fails too.

Dmitry Baryshkov committed 4 years ago

Commit 998fcd01 parent f6f7d872 files · +3 −3Browse files

Unified · Split

2 files
  1. drivers/cpuidle/cpuidle-psci-domain.c +1 −3
  2. drivers/firmware/psci/psci.c +2 −0
drivers/cpuidle/cpuidle-psci-domain.c+1−3
@@ -124,10 +124,8 @@ static bool psci_pd_try_set_osi_mode(void) · 123 unmodified lines
124124 return false;
125125
126126 ret = psci_set_osi_mode(true);
127− if (ret) {
128− pr_warn("failed to enable OSI mode: %d\n", ret);
127+ if (ret)
129128 return false;
130− }
131129
132130 return true;
133131 }
drivers/firmware/psci/psci.c+2−0
@@ -163,6 +163,8 @@ int psci_set_osi_mode(bool enable) · 162 unmodified lines
163163 PSCI_1_0_SUSPEND_MODE_PC;
164164
165165 err = invoke_psci_fn(PSCI_1_0_FN_SET_SUSPEND_MODE, suspend_mode, 0, 0);
166+ if (err < 0)
167+ pr_warn("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err);
166168 return psci_to_linux_errno(err);
167169 }
168170

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t