summaryrefslogtreecommitdiffstats
path: root/core/opal.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-02-18 16:14:55 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-18 16:14:55 +1100
commite5a0df37aeeb4e8a484f8305be146a4b2b000f21 (patch)
treec972c20cfc48e4ef96415eaaab8a63a8b504cdd8 /core/opal.c
parent026e00e3b66e9044120bf36d16404b6e19442508 (diff)
downloadtalos-skiboot-e5a0df37aeeb4e8a484f8305be146a4b2b000f21.tar.gz
talos-skiboot-e5a0df37aeeb4e8a484f8305be146a4b2b000f21.zip
Limit number of warnings of pollers run with lock held
Otherwise we pretty much spin in printing backtraces on some machines. A limit of 64 per boot is likely to give us enough bugs to fix. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/opal.c')
-rw-r--r--core/opal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/opal.c b/core/opal.c
index a49d0224..6fbbdde9 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -283,10 +283,15 @@ void opal_del_poller(void (*poller)(void *data))
void opal_run_pollers(void)
{
struct opal_poll_entry *poll_ent;
+ static int pollers_with_lock_warnings = 0;
- if (this_cpu()->lock_depth) {
+ if (this_cpu()->lock_depth && pollers_with_lock_warnings < 64) {
prlog(PR_ERR, "Running pollers with lock held !\n");
backtrace();
+ pollers_with_lock_warnings++;
+ if (pollers_with_lock_warnings == 64)
+ prlog(PR_ERR, "opal_run_pollers with lock run 64 "
+ "times, disabling warning.\n");
}
/* We run the timers first */
OpenPOWER on IntegriCloud