aboutsummaryrefslogtreecommitdiff
path: root/core/direct-controls.c
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2017-10-17 11:39:09 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-10-18 19:22:53 -0500
commite2bc5cde8c77e63d62d79a09eaa4459aea906506 (patch)
treee2db5221a3d9b3a0d6834f1581c2ee580152c92c /core/direct-controls.c
parent4bd4707d19e0ec689da011547a6a2489612fe772 (diff)
downloadskiboot-e2bc5cde8c77e63d62d79a09eaa4459aea906506.zip
skiboot-e2bc5cde8c77e63d62d79a09eaa4459aea906506.tar.gz
skiboot-e2bc5cde8c77e63d62d79a09eaa4459aea906506.tar.bz2
core: direct-controls: Fix clearing of special wakeup
'special_wakeup_count' is incremented on successfully asserting special wakeup. So we will never clear the special wakeup if we check 'special_wakeup_count' to be zero. Fix this issue by checking the 'special_wakeup_count' to 1 in dctl_clear_special_wakeup(). Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/direct-controls.c')
-rw-r--r--core/direct-controls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/direct-controls.c b/core/direct-controls.c
index c6834d7..512cb36 100644
--- a/core/direct-controls.c
+++ b/core/direct-controls.c
@@ -247,10 +247,13 @@ static int dctl_clear_special_wakeup(struct cpu_thread *t)
return OPAL_UNSUPPORTED;
lock(&c->dctl_lock);
- if (c->special_wakeup_count == 0)
+ if (!c->special_wakeup_count)
+ goto out;
+ if (c->special_wakeup_count == 1)
rc = p9_core_clear_special_wakeup(c);
if (!rc)
c->special_wakeup_count--;
+out:
unlock(&c->dctl_lock);
return rc;