cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 25 Feb 2022 19:06:45 +0000 (13:06 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:34:04 +0000 (09:34 +0200)
commit5b13295ac58416bc8f7db3fd87ef11ca58b5b436
tree56ac139483a3b87c29e871d9093c31d63c3329fd
parent9873fe0f3857c500fa21f92fe43b2a177e8de208
cpuidle: PSCI: Move the `has_lpi` check to the beginning of the function

commit 01f6c7338ce267959975da65d86ba34f44d54220 upstream.

Currently the first thing checked is whether the PCSI cpu_suspend function
has been initialized.

Another change will be overloading `acpi_processor_ffh_lpi_probe` and
calling it sooner.  So make the `has_lpi` check the first thing checked
to prepare for that change.

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/cpuidle.c