SBE: Account cancelled timer request
[ Upstream commit b44c7594523d20945179e497c45ec9007981ac75 ]
Currently we are not accounting cancelled timer request. So in some
corner cases we may schedule new timer request with
new-timer-value > inflight-timer-value.
Lets explicit check new_target value with inflight timer value.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c
index 63ff3cc..898a1fb 100644
--- a/hw/sbe-p9.c
+++ b/hw/sbe-p9.c
@@ -800,6 +800,9 @@
u64 tb_cnt, now = mftb();
if (sbe_timer_in_progress) {
+ if (sbe_timer_target >= sbe_last_gen_stamp)
+ return;
+
if (now >= sbe_last_gen_stamp)
return;