Skip to content

Commit

Permalink
cpu: Use STOP1 on POWER9 for idle/sleep inside OPAL
Browse files Browse the repository at this point in the history
The current code requests STOP3, which means it gets STOP2 in practice.

STOP2 has proven to occasionally be unreliable depending on FW
version and chip revision, it also requires a functional CME,
so instead, let's use STOP1. The difference is rather minimum
for something that is only used a few seconds during boot.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed May 24, 2018
1 parent 0899215 commit 15d9f31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,14 @@ static void cpu_idle_p9(enum cpu_wake_cause wake_on)

if (sreset_enabled) {
/* stop with EC=1 (sreset) and ESL=1 (enable thread switch). */
/* PSSCR SD=0 ESL=1 EC=1 PSSL=0 TR=3 MTL=0 RL=3 */
/* PSSCR SD=0 ESL=1 EC=1 PSSL=0 TR=3 MTL=0 RL=1 */
psscr = PPC_BIT(42) | PPC_BIT(43) |
PPC_BITMASK(54, 55) | PPC_BITMASK(62,63);
PPC_BITMASK(54, 55) | PPC_BIT(63);
enter_p9_pm_state(psscr);
} else {
/* stop with EC=0 (resumes) which does not require sreset. */
/* PSSCR SD=0 ESL=0 EC=0 PSSL=0 TR=3 MTL=0 RL=3 */
psscr = PPC_BITMASK(54, 55) | PPC_BITMASK(62,63);
/* PSSCR SD=0 ESL=0 EC=0 PSSL=0 TR=3 MTL=0 RL=1 */
psscr = PPC_BITMASK(54, 55) | PPC_BIT(63);
enter_p9_pm_lite_state(psscr);
}

Expand Down

0 comments on commit 15d9f31

Please sign in to comment.