cpuidle: psci: Skip SET_SUSPEND_MODE when OSI is unsupported

The PSCI cpuidle domain probe calls psci_set_osi_mode(use_osi) after
creating the power domains. When OSI is unsupported, this still calls
SET_SUSPEND_MODE to select platform-coordinated mode. Firmware that
does not implement this optional function may return NOT_SUPPORTED,
causing the probe to fail with -EOPNOTSUPP.

When OSI is unsupported, the PSCI specification allows the OS to assume
platform-coordinated mode. Skip the call in that case, and request OSI
mode only when psci_has_osi_support() is true.

Fixes: 12acb348fa45 ("cpuidle: psci: Move enabling OSI mode after power domains creation")
Cc: stable@vger.kernel.org
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
1 file changed