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
124 return false;124 return false;
125 125
126 ret = psci_set_osi_mode(true);126 ret = psci_set_osi_mode(true);
127 if (ret) {127 if (ret)
128 pr_warn("failed to enable OSI mode: %d\n", ret);
129 return false;128 return false;
130 }
131 129
132 return true;130 return true;
133}131}
drivers/firmware/psci/psci.c+2−0
@@ -163,6 +163,8 @@ int psci_set_osi_mode(bool enable) · 162 unmodified lines
163 PSCI_1_0_SUSPEND_MODE_PC;163 PSCI_1_0_SUSPEND_MODE_PC;
164 164
165 err = invoke_psci_fn(PSCI_1_0_FN_SET_SUSPEND_MODE, suspend_mode, 0, 0);165 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);
166 return psci_to_linux_errno(err);168 return psci_to_linux_errno(err);
167}169}
168 170

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