Skip to content

Commit

Permalink
arm64: psci: fix cpu_suspend to check idle state type for index
Browse files Browse the repository at this point in the history
This fix rectifies the psci cpu_suspend implementation to check the
PSCI power state parameter type field associated with the requested idle
state index.

Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Amit Daniel Kachhap authored and Will Deacon committed Oct 30, 2014
1 parent 3dec0fe commit f4fd36b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/kernel/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index)
if (WARN_ON_ONCE(!index))
return -EINVAL;

if (state->type == PSCI_POWER_STATE_TYPE_STANDBY)
if (state[index - 1].type == PSCI_POWER_STATE_TYPE_STANDBY)
ret = psci_ops.cpu_suspend(state[index - 1], 0);
else
ret = __cpu_suspend(index, psci_suspend_finisher);
Expand Down

0 comments on commit f4fd36b

Please sign in to comment.