Skip to content

Commit

Permalink
capp: Disable fast-reboot whenever enable_capi_mode() is called
Browse files Browse the repository at this point in the history
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@linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
vaibhav92 authored and stewartsmith committed Mar 7, 2018
1 parent a72d055 commit b1190f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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;
}

Expand Down

0 comments on commit b1190f4

Please sign in to comment.