]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me()
authorNathan Lynch <nathanl@linux.ibm.com>
Mon, 7 Dec 2020 21:51:54 +0000 (15:51 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Dec 2020 10:41:01 +0000 (21:41 +1100)
rtas_suspend_last_cpu() and related code perform a lot of work that
isn't relevant to the hibernation workflow. All other CPUs are offline
when called so there is no need to place them in H_JOIN or prod them
on resume, nor is there need for retries or operations on shared
state.

Call the rtas_ibm_suspend_me() wrapper function directly from
pseries_suspend_enter() instead of using rtas_suspend_last_cpu().

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201207215200.1785968-23-nathanl@linux.ibm.com
arch/powerpc/platforms/pseries/suspend.c

index 3315d698d5abd65783fb1ba16511e01602f16b2c..703728cb95ec133fa9f5db5446269f922742dd1a 100644 (file)
@@ -76,11 +76,7 @@ static void pseries_suspend_enable_irqs(void)
  **/
 static int pseries_suspend_enter(suspend_state_t state)
 {
-       int rc = rtas_suspend_last_cpu(&suspend_data);
-
-       atomic_set(&suspending, 0);
-       atomic_set(&suspend_data.done, 1);
-       return rc;
+       return rtas_ibm_suspend_me(NULL);
 }
 
 /**