linux-sg2042/arch/powerpc
Tyrel Datwyler c03e73740d powerpc/pseries: Simplify check for suspendability during suspend/migration
During suspend/migration operation we must wait for the VASI state reported
by the hypervisor to become Suspending prior to making the ibm,suspend-me
RTAS call. Calling routines to rtas_ibm_supend_me() pass a vasi_state variable
that exposes the VASI state to the caller. This is unnecessary as the caller
only really cares about the following three conditions; if there is an error
we should bailout, success indicating we have suspended and woken back up so
proceed to device tree update, or we are not suspendable yet so try calling
rtas_ibm_suspend_me again shortly.

This patch removes the extraneous vasi_state variable and simply uses the
return code to communicate how to proceed. We either succeed, fail, or get
-EAGAIN in which case we sleep for a second before trying to call
rtas_ibm_suspend_me again. The behaviour of ppc_rtas() remains the same,
but migrate_store() now returns the propogated error code on failure.
Previously -1 was returned from migrate_store() in the  failure case which
equates to -EPERM and was clearly wrong.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Cc: Nathan Fontenont <nfont@linux.vnet.ibm.com>
Cc: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-03-28 12:20:39 +11:00
..
boot powerpc/boot: don't clobber r6 and r7 in epapr boot 2015-03-16 18:58:35 +11:00
configs The clock framework changes for 3.20 contain the usual driver additions, 2015-02-21 12:30:30 -08:00
crypto crypto: add missing crypto module aliases 2015-01-13 22:29:11 +11:00
include powerpc/pseries: Simplify check for suspendability during suspend/migration 2015-03-28 12:20:39 +11:00
kernel powerpc/pseries: Simplify check for suspendability during suspend/migration 2015-03-28 12:20:39 +11:00
kvm powerpc/book3s: Fix flush_tlb cpu_spec hook to take a generic argument. 2015-03-17 07:52:48 +11:00
lib Merge branch 'next-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into test 2015-03-26 20:04:28 +11:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm Merge branch 'next-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into test 2015-03-26 20:04:28 +11:00
net module: remove mod arg from module_free, rename module_memfree(). 2015-01-20 11:38:33 +10:30
oprofile powerpc updates for 3.19 2014-12-11 17:48:14 -08:00
perf powerpc/perf: add missing put_cpu_var in power_pmu_event_init 2015-03-27 20:07:01 +11:00
platforms powerpc/pseries: Simplify check for suspendability during suspend/migration 2015-03-28 12:20:39 +11:00
sysdev powerpc/mpic: remove unused functions 2015-03-16 18:50:18 +11:00
xmon powerpc updates for 3.20 2015-02-11 18:15:38 -08:00
Kconfig powerpc: kill PPC_OF 2015-03-17 20:04:32 +11:00
Kconfig.debug powerpc: kill PPC_OF 2015-03-17 20:04:32 +11:00
Makefile powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00