summaryrefslogtreecommitdiffstats
path: root/core/opal.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/opal.c')
-rw-r--r--core/opal.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/opal.c b/core/opal.c
index 6fbbdde9..5e96e0a3 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -285,6 +285,14 @@ void opal_run_pollers(void)
struct opal_poll_entry *poll_ent;
static int pollers_with_lock_warnings = 0;
+ /* Don't re-enter on this CPU */
+ if (this_cpu()->in_poller) {
+ prlog(PR_ERR, "OPAL: Poller recursion detected.\n");
+ backtrace();
+ return;
+ }
+ this_cpu()->in_poller = true;
+
if (this_cpu()->lock_depth && pollers_with_lock_warnings < 64) {
prlog(PR_ERR, "Running pollers with lock held !\n");
backtrace();
@@ -301,6 +309,9 @@ void opal_run_pollers(void)
list_for_each(&opal_pollers, poll_ent, link)
poll_ent->poller(poll_ent->data);
+ /* Disable poller flag */
+ this_cpu()->in_poller = false;
+
/* On debug builds, print max stack usage */
check_stacks();
}
OpenPOWER on IntegriCloud