[Skiboot] [PATCH] core: direct-controls: Fix clearing of special wakeup

Shilpasri G Bhat shilpa.bhat at linux.vnet.ibm.com
Tue Oct 17 17:09:09 AEDT 2017


'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 at linux.vnet.ibm.com>
---
 core/direct-controls.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/direct-controls.c b/core/direct-controls.c
index 9acdab5..df83a97 100644
--- a/core/direct-controls.c
+++ b/core/direct-controls.c
@@ -244,10 +244,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;
-- 
1.8.3.1



More information about the Skiboot mailing list