diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2015-11-25 14:01:07 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-03-30 08:23:36 +1100 |
commit | 3ad485bd99458f21a8933aaa3dbecdeccf7061d2 (patch) | |
tree | 71c205f37e6e561f2c456681ab119f94008abc3a | |
parent | 53def38014107ca522af8ee0a1004d36b31e3681 (diff) | |
download | skiboot-skiboot-2.1.1-fw810.50-1.zip skiboot-skiboot-2.1.1-fw810.50-1.tar.gz skiboot-skiboot-2.1.1-fw810.50-1.tar.bz2 |
FSP: Give up PSI link on shutdownskiboot-2.1.1-fw810.50-1
Since we are anyway on the way to standby and apparently the other
hypervisor also does this.
Tested-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/fsp/fsp.c | 22 | ||||
-rw-r--r-- | include/fsp.h | 1 | ||||
-rw-r--r-- | platforms/ibm-fsp/common.c | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 32c1d79..8818fb0 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -547,6 +547,28 @@ static void fsp_start_rr(struct fsp *fsp) */ } +/* + * Called on normal/quick shutdown to give up the PSI link + */ +void fsp_reset_links(void) +{ + struct fsp *fsp = fsp_get_active(); + struct fsp_iopath *iop; + + if (!fsp) + return; + + /* Already in one of the error states? */ + if (fsp_in_hir(fsp) || fsp_in_reset(fsp)) + return; + + iop = &fsp->iopath[fsp->active_iopath]; + prlog(PR_NOTICE, "FSP #%d: Host initiated shutdown." + " Giving up the PSI link\n", fsp->index); + psi_disable_link(iop->psi); + return; +} + static void fsp_trace_event(struct fsp *fsp, u32 evt, u32 data0, u32 data1, u32 data2, u32 data3) { diff --git a/include/fsp.h b/include/fsp.h index 53d03f9..927246b 100644 --- a/include/fsp.h +++ b/include/fsp.h @@ -741,6 +741,7 @@ extern void fsp_surv_query(void); /* Reset/Reload */ extern void fsp_reinit_fsp(void); extern void fsp_trigger_reset(void); +extern void fsp_reset_links(void); /* FSP memory errors */ extern void fsp_memory_err_init(void); diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c index 4a2c6c1..40e5bf1 100644 --- a/platforms/ibm-fsp/common.c +++ b/platforms/ibm-fsp/common.c @@ -202,6 +202,7 @@ int64_t ibm_fsp_cec_power_down(uint64_t request) if (fsp_sync_msg(fsp_mkmsg(FSP_CMD_POWERDOWN_NORM, 1, request), true)) return OPAL_INTERNAL_ERROR; + fsp_reset_links(); return OPAL_SUCCESS; } |