diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2020-12-08 00:51:57 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-12-08 13:41:02 +0300 |
commit | fa53bcdb7413e7c40170106781f6b5bb9d74db84 (patch) | |
tree | e6ef2ee8725c806be336dca647eed131e8a14845 /arch/powerpc/platforms/pseries/suspend.c | |
parent | b866459489fe8ef0e92cde3cbd6bbb1af6c4e99b (diff) | |
download | linux-fa53bcdb7413e7c40170106781f6b5bb9d74db84.tar.xz |
powerpc/pseries/hibernation: perform post-suspend fixups later
The pseries hibernate code calls post_mobility_fixup() which is sort
of a dumping ground of fixups that need to run after resuming from
suspend regardless of whether suspend was a hibernation or a
migration. Calling post_mobility_fixup() from
pseries_suspend_enable_irqs() runs this code early in resume with
devices suspended and only one CPU up, while the much more commonly
used migration case runs these fixups in a more typical process
context.
Call post_mobility_fixup() after the suspend core returns a success
status to the hibernate sysfs store method and remove
pseries_suspend_enable_irqs().
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-26-nathanl@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries/suspend.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/suspend.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/arch/powerpc/platforms/pseries/suspend.c b/arch/powerpc/platforms/pseries/suspend.c index 6a94cc0deb88..589a91730db8 100644 --- a/arch/powerpc/platforms/pseries/suspend.c +++ b/arch/powerpc/platforms/pseries/suspend.c @@ -51,21 +51,6 @@ static int pseries_suspend_begin(u64 stream_id) } /** - * pseries_suspend_enable_irqs - * - * Post suspend configuration updates - * - **/ -static void pseries_suspend_enable_irqs(void) -{ - /* - * Update configuration which can be modified based on device tree - * changes during resume. - */ - post_mobility_fixup(); -} - -/** * pseries_suspend_enter - Final phase of hibernation * * Return value: @@ -127,8 +112,11 @@ static ssize_t store_hibernate(struct device *dev, if (!rc) rc = pm_suspend(PM_SUSPEND_MEM); - if (!rc) + if (!rc) { rc = count; + post_mobility_fixup(); + } + return rc; } @@ -214,7 +202,6 @@ static int __init pseries_suspend_init(void) if ((rc = pseries_suspend_sysfs_register(&suspend_dev))) return rc; - ppc_md.suspend_enable_irqs = pseries_suspend_enable_irqs; suspend_set_ops(&pseries_suspend_ops); return 0; } |