aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2015-11-25 14:01:07 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-12-01 18:13:04 +1100
commit467c017502542b34c9cad5c79cd31b84fb1c94bd (patch)
treeb4615638f0bd92156662760568b229258cc030fe
parentb96a20e2f78c5eb23a951259ece185b2897e1416 (diff)
downloadskiboot-467c017502542b34c9cad5c79cd31b84fb1c94bd.zip
skiboot-467c017502542b34c9cad5c79cd31b84fb1c94bd.tar.gz
skiboot-467c017502542b34c9cad5c79cd31b84fb1c94bd.tar.bz2
FSP: Give up PSI link on shutdown
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.c22
-rw-r--r--include/fsp.h1
-rw-r--r--platforms/ibm-fsp/common.c1
3 files changed, 24 insertions, 0 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index b53c3f0..220b97e 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -569,6 +569,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 a61bd58..7ea162d 100644
--- a/include/fsp.h
+++ b/include/fsp.h
@@ -802,6 +802,7 @@ extern void fsp_ipmi_init(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 59a890b..dc3a002 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -222,6 +222,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;
}