summaryrefslogtreecommitdiffstats
path: root/core/opal.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-08 11:41:13 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-08 12:34:57 +1000
commit5d245a9a54c90029f15ebb2bc6cda673d1894a3d (patch)
tree91d4dbb97482cf50b201820e83fa2ad0aef379e4 /core/opal.c
parentb8464b315ba119fb606477f7038f6f1b1209c455 (diff)
downloadblackbird-skiboot-5d245a9a54c90029f15ebb2bc6cda673d1894a3d.tar.gz
blackbird-skiboot-5d245a9a54c90029f15ebb2bc6cda673d1894a3d.zip
opal: Replace fsp_poll() with a full run of all OPAL pollers
Otherwise we don't handle surveillance and PSI link monitoring This should fix cases of surveillance timeouts during things like code update such as BZ109939 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'core/opal.c')
-rw-r--r--core/opal.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/core/opal.c b/core/opal.c
index 2727fd5d..0d85c5f7 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -212,10 +212,23 @@ void opal_del_poller(void (*poller)(void *data))
unlock(&opal_poll_lock);
}
-static int64_t opal_poll_events(uint64_t *outstanding_event_mask)
+void opal_run_pollers(void)
{
struct opal_poll_entry *poll_ent;
+ /*
+ * Only run the pollers if they aren't already running
+ * on another CPU and we aren't re-entering.
+ */
+ if (try_lock(&opal_poll_lock)) {
+ list_for_each(&opal_pollers, poll_ent, link)
+ poll_ent->poller(poll_ent->data);
+ unlock(&opal_poll_lock);
+ }
+}
+
+static int64_t opal_poll_events(uint64_t *outstanding_event_mask)
+{
/* Check if we need to trigger an attn for test use */
if (attn_trigger == 0xdeadbeef) {
printf("Triggering attn\n");
@@ -228,15 +241,7 @@ static int64_t opal_poll_events(uint64_t *outstanding_event_mask)
hir_trigger = 0;
}
- /*
- * Only run the pollers if they aren't already running
- * on another CPU
- */
- if (try_lock(&opal_poll_lock)) {
- list_for_each(&opal_pollers, poll_ent, link)
- poll_ent->poller(poll_ent->data);
- unlock(&opal_poll_lock);
- }
+ opal_run_pollers();
if (outstanding_event_mask)
*outstanding_event_mask = opal_pending_events;
OpenPOWER on IntegriCloud