summaryrefslogtreecommitdiffstats
path: root/hw/fsp/fsp.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-11-18 14:58:28 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-11-24 16:47:16 +1100
commit9fcb109218b1374a8caa3cac62e83fbedb1f7f2f (patch)
treeb8197d92adc3ae7e13526df37ad0f3c0e8d93d14 /hw/fsp/fsp.c
parent833b1e6bb2aef485226f8bc48ec1b45c422b2152 (diff)
downloadtalos-skiboot-9fcb109218b1374a8caa3cac62e83fbedb1f7f2f.tar.gz
talos-skiboot-9fcb109218b1374a8caa3cac62e83fbedb1f7f2f.zip
fsp: Don't recurse pollers in ibm_fsp_terminate
If we were to terminate in a poller, we'd call op_display() which called pollers which hit the recursive poller warning, which ended in not much fun at all. This patch will skip the running of pollers and instead run the FSP poller to set the op-panel display before attn. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp.c')
-rw-r--r--hw/fsp/fsp.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 58219a0a..c25e42c8 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -1689,6 +1689,7 @@ void fsp_interrupt(void)
unlock(&fsp_lock);
}
+
int fsp_sync_msg(struct fsp_msg *msg, bool autofree)
{
int rc;
@@ -1977,6 +1978,36 @@ static void fsp_opal_poll(void *data __unused)
}
}
+int fsp_fatal_msg(struct fsp_msg *msg)
+{
+ int rc = 0;
+
+ rc = fsp_queue_msg(msg, NULL);
+ if (rc)
+ return rc;
+
+ while(fsp_msg_busy(msg)) {
+ cpu_relax();
+ fsp_opal_poll(NULL);
+ }
+
+ switch(msg->state) {
+ case fsp_msg_done:
+ rc = 0;
+ break;
+ case fsp_msg_timeout:
+ rc = -1; /* XXX to improve */
+ break;
+ default:
+ rc = -1; /* Should not happen... (assert ?) */
+ }
+
+ if (msg->resp)
+ rc = (msg->resp->word1 >> 8) & 0xff;
+
+ return rc;
+}
+
static bool fsp_init_one(const char *compat)
{
struct dt_node *fsp_node;
OpenPOWER on IntegriCloud