diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-16 16:04:59 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-24 17:23:40 +1100 |
commit | e162f880d3ad9797e35796aef6e4a6bf02bd0d2f (patch) | |
tree | 6911c44d4b660a94397a412a7127d13625ce8873 | |
parent | b4bde3b4c7498e21552218ecf67988d18aaac9df (diff) | |
download | skiboot-e162f880d3ad9797e35796aef6e4a6bf02bd0d2f.zip skiboot-e162f880d3ad9797e35796aef6e4a6bf02bd0d2f.tar.gz skiboot-e162f880d3ad9797e35796aef6e4a6bf02bd0d2f.tar.bz2 |
Limit number of "Poller recursion detected" errors to display
In some error conditions, we could spiral out of control on this
and spend all of our time printing the exact same backtrace.
Limit it to 16 times, because 16 is a nice number.
Cc: stable
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
(cherry picked from commit b6a729e118f42dae88ebf70a09a7e2aa4f788fdc)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/opal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/opal.c b/core/opal.c index c2c4d8d..d34d264 100644 --- a/core/opal.c +++ b/core/opal.c @@ -285,11 +285,15 @@ void opal_run_pollers(void) { struct opal_poll_entry *poll_ent; static int pollers_with_lock_warnings = 0; + static int poller_recursion = 0; /* Don't re-enter on this CPU */ - if (this_cpu()->in_poller) { + if (this_cpu()->in_poller && poller_recursion < 16) { prlog(PR_ERR, "OPAL: Poller recursion detected.\n"); backtrace(); + poller_recursion++; + if (poller_recursion == 16) + prlog(PR_ERR, "OPAL: Squashing future poller recursion warnings (>16).\n"); return; } this_cpu()->in_poller = true; |