[Skiboot] [PATCH] capp: Disable fast-reboot whenever enable_capi_mode() is called
Vaibhav Jain
vaibhav at linux.vnet.ibm.com
Fri Mar 2 22:12:46 AEDT 2018
This patch updates phb4_set_capi_mode() to disable fast-reboot
whenever enable_capi_mode() is called, irrespective to its return
value. This should prevent against a possibility of not disabling
fast-reboot when some changes to enable_capi_mode() causing return of
an error and leaving CAPP in enabled mode.
Suggested-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
---
hw/phb4.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/phb4.c b/hw/phb4.c
index 8835e3de..47175df2 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -4061,11 +4061,13 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode,
ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT0,
CAPP_MAX_STQ_ENGINES |
CAPP_MIN_DMA_READ_ENGINES);
+ disable_fast_reboot("CAPP being enabled");
break;
case OPAL_PHB_CAPI_MODE_DMA_TVT1:
ret = enable_capi_mode(p, pe_number, CAPI_DMA_TVT1,
CAPP_MIN_STQ_ENGINES |
CAPP_MAX_DMA_READ_ENGINES);
+ disable_fast_reboot("CAPP being enabled");
break;
case OPAL_PHB_CAPI_MODE_SNOOP_ON:
/* nothing to do P9 if CAPP is alreay enabled */
@@ -4079,10 +4081,6 @@ static int64_t phb4_set_capi_mode(struct phb *phb, uint64_t mode,
ret = OPAL_UNSUPPORTED;
}
- /* If CAPP enabled then disable fast-reboot for now */
- if (ret == OPAL_SUCCESS)
- disable_fast_reboot("CAPP being enabled");
-
return ret;
}
--
2.14.3
More information about the Skiboot
mailing list