[Skiboot] [PATCH v2 10/11] hw/sbe-p9: Limit SBE timer to 10s
Nicholas Piggin
npiggin at gmail.com
Tue Jan 14 22:46:51 AEDT 2025
The SBE in P10 has a maximum expiry limit of just over 10s, so limit
SBE timers to 10s. If the desired timeout is longer than 10s,
additional SBE timers will be scheduled as the 10s timers are
serviced.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
hw/sbe-p9.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c
index 4684bec36..70e5c385b 100644
--- a/hw/sbe-p9.c
+++ b/hw/sbe-p9.c
@@ -90,6 +90,8 @@ static struct lock sbe_timer_lock;
*/
#define SBE_TIMER_MIN_US_P9 500
+#define SBE_TIMER_MAX_US 10000000
+
static uint64_t sbe_timer_min_us;
static uint64_t sbe_timer_min_tb;
@@ -827,8 +829,11 @@ static void p9_sbe_timer_schedule(void)
if ((sbe_timer_target - now) > sbe_timer_min_tb) {
tb_cnt = sbe_timer_target - now + usecs_to_tb(1) - 1;
tick_us = tb_to_usecs(tb_cnt);
+ if (tick_us > SBE_TIMER_MAX_US)
+ tick_us = SBE_TIMER_MAX_US;
}
}
+
sbe_current_timer_tb = now + usecs_to_tb(tick_us);
/* Clear sequence number. p9_sbe_queue_msg will add new sequene ID */
--
2.45.2
More information about the Skiboot
mailing list