powerpc/pseries/hibernation: remove prepare_late() callback
authorNathan Lynch <nathanl@linux.ibm.com>
Mon, 7 Dec 2020 21:51:58 +0000 (15:51 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Dec 2020 10:41:02 +0000 (21:41 +1100)
The pseries hibernate code no longer calls into the original
join/suspend code in kernel/rtas.c, so pseries_prepare_late() and
related code don't accomplish anything now.

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-27-nathanl@linux.ibm.com
arch/powerpc/platforms/pseries/suspend.c

index 589a91730db809c584eaae2824b8b023b72eee28..1b902cbf85c537a95d8115b5bd14b94431f2268a 100644 (file)
@@ -15,9 +15,6 @@
 #include <asm/topology.h>
 
 static struct device suspend_dev;
-static DECLARE_COMPLETION(suspend_work);
-static struct rtas_suspend_me_data suspend_data;
-static atomic_t suspending;
 
 /**
  * pseries_suspend_begin - First phase of hibernation
@@ -61,23 +58,6 @@ static int pseries_suspend_enter(suspend_state_t state)
        return rtas_ibm_suspend_me(NULL);
 }
 
-/**
- * pseries_prepare_late - Prepare to suspend all other CPUs
- *
- * Return value:
- *     0 on success / other on failure
- **/
-static int pseries_prepare_late(void)
-{
-       atomic_set(&suspending, 1);
-       atomic_set(&suspend_data.working, 0);
-       atomic_set(&suspend_data.done, 0);
-       atomic_set(&suspend_data.error, 0);
-       suspend_data.complete = &suspend_work;
-       reinit_completion(&suspend_work);
-       return 0;
-}
-
 /**
  * store_hibernate - Initiate partition hibernation
  * @dev:               subsys root device
@@ -152,7 +132,6 @@ static struct bus_type suspend_subsys = {
 
 static const struct platform_suspend_ops pseries_suspend_ops = {
        .valid          = suspend_valid_only_mem,
-       .prepare_late   = pseries_prepare_late,
        .enter          = pseries_suspend_enter,
 };
 
@@ -195,10 +174,6 @@ static int __init pseries_suspend_init(void)
        if (!firmware_has_feature(FW_FEATURE_LPAR))
                return 0;
 
-       suspend_data.token = rtas_token("ibm,suspend-me");
-       if (suspend_data.token == RTAS_UNKNOWN_SERVICE)
-               return 0;
-
        if ((rc = pseries_suspend_sysfs_register(&suspend_dev)))
                return rc;