diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2020-11-24 12:46:21 +0530 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-01-06 16:57:16 +0530 |
commit | 98e191382544f2eac7b039216907d514bf0c3cd7 (patch) | |
tree | 1b04a2501bd14c25daa9d30f0878638dc6aeda67 | |
parent | 739a0d608a2095d28dd02e2c0774b076258c81f1 (diff) | |
download | skiboot-98e191382544f2eac7b039216907d514bf0c3cd7.zip skiboot-98e191382544f2eac7b039216907d514bf0c3cd7.tar.gz skiboot-98e191382544f2eac7b039216907d514bf0c3cd7.tar.bz2 |
core/platform: Fallback to full_reboot if fast-reboot fails
[ Upstream commit 8256da311027176dd22885205f16869f55b79f3b ]
If fast reboot fails then we return to Linux with OPAL_SUCCESS.
Current Linux code thinks that request succedded and enters
infinite loop (see Linux pnv_restart() code).
This patch fixes above issue by return OPAL_UNSUPPORTED if fast
reboot fails.
Alternatively we can directly call full_reboot() itself. But I
think it makes sense to go back to Linux and report the failure.
And Linux falls back to normal reboot request.
Fixes: 10bbcd07 ("core/platform: Add an explicit fast-reboot type")
Cc: Oliver O'Halloran <oohall@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Dan HorĂ¡k <dan@danny.cz>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r-- | core/platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/platform.c b/core/platform.c index 8f4a3b8..320fdea 100644 --- a/core/platform.c +++ b/core/platform.c @@ -124,7 +124,8 @@ static int64_t opal_cec_reboot2(uint32_t reboot_type, char *diag) case OPAL_REBOOT_FAST: prlog(PR_NOTICE, "Reboot: Fast reboot requested by OS\n"); fast_reboot(); - break; + prlog(PR_NOTICE, "Reboot: Fast reboot failed\n"); + return OPAL_UNSUPPORTED; default: prlog(PR_NOTICE, "OPAL: Unsupported reboot request %d\n", reboot_type); return OPAL_UNSUPPORTED; |