11.09.2023 09:43, Alistair Francis пишет:
From: Akihiko Odaki <akihiko.od...@daynix.com>

riscv_trigger_init() had been called on reset events that can happen
several times for a CPU and it allocated timers for itrigger. If old
timers were present, they were simply overwritten by the new timers,
resulting in a memory leak.

Divide riscv_trigger_init() into two functions, namely
riscv_trigger_realize() and riscv_trigger_reset() and call them in
appropriate timing. The timer allocation will happen only once for a
CPU in riscv_trigger_realize().

Fixes: 5a4ae64cac ("target/riscv: Add itrigger support when icount is enabled")
Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: LIU Zhiwei <zhiwei_...@linux.alibaba.com>
Reviewed-by: Alistair Francis <alistair.fran...@wdc.com>
Message-ID: <20230818034059.9146-1-akihiko.od...@daynix.com>
Signed-off-by: Alistair Francis <alistair.fran...@wdc.com>

This smells like one more change from this series which should be
picked up for stable-8.1.  Picking this one up, please let me know
if I shuldn't.

Thanks,

/mjt

Reply via email to