[Skiboot] [RESEND-PATCH] core/opal: Fix recursion check in opal_run_pollers()
Vaibhav Jain
vaibhav at linux.ibm.com
Fri May 4 19:43:41 AEST 2018
An earlier commit introduced a counter variable poller_recursion to
limit to the number number of error messages shown when opal_pollers
are run recursively. However the check for the counter value was
placed in a way that the poller recursion was only detected first 16
times and then allowed afterwards.
This patch fixes this by moving the check for the counter value inside
the conditional branch with some re-factoring so that opal_poller
recursion is not erroneously allowed after poll_recursion is detected
first 16 times.
Fixes: b6a729e118f4 ("Limit number of Poller recursion detected errors to display")
Signed-off-by: Vaibhav Jain <vaibhav at linux.ibm.com>
---
Changelog:
Resend -> Previous patch didn't make to the skiboot mailing list due to
a list membership glitch.
---
core/opal.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/core/opal.c b/core/opal.c
index 3642fb04..e3a3bbde 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -552,20 +552,25 @@ void opal_run_pollers(void)
bool was_in_poller;
/* Don't re-enter on this CPU, unless it was an OPAL re-entry */
- if (this_cpu()->in_opal_call == 1 &&
- this_cpu()->in_poller && poller_recursion < 16) {
+ if (this_cpu()->in_opal_call == 1 && this_cpu()->in_poller) {
+
/**
* @fwts-label OPALPollerRecursion
* @fwts-advice Recursion detected in opal_run_pollers(). This
* indicates a bug in OPAL where a poller ended up running
* pollers, which doesn't lead anywhere good.
*/
- disable_fast_reboot("Poller recursion detected.");
- prlog(PR_ERR, "OPAL: Poller recursion detected.\n");
- backtrace();
poller_recursion++;
+ if (poller_recursion <= 16) {
+ disable_fast_reboot("Poller recursion detected.");
+ prlog(PR_ERR, "OPAL: Poller recursion detected.\n");
+ backtrace();
+
+ }
+
if (poller_recursion == 16)
prlog(PR_ERR, "OPAL: Squashing future poller recursion warnings (>16).\n");
+
return;
}
was_in_poller = this_cpu()->in_poller;
--
2.14.3
More information about the Skiboot
mailing list