diff options
author | Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> | 2012-06-16 15:20:59 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2012-06-21 15:19:16 +0200 |
commit | 7798a8828a654ce438584bdfccaa3e8a120cf998 (patch) | |
tree | 327345bf3e83cd630ef28f577052ca361b1353c1 /hw | |
parent | fc3511d4d803d7bccbca235c56e3022ab8aec0c3 (diff) | |
download | qemu-7798a8828a654ce438584bdfccaa3e8a120cf998.zip qemu-7798a8828a654ce438584bdfccaa3e8a120cf998.tar.gz qemu-7798a8828a654ce438584bdfccaa3e8a120cf998.tar.bz2 |
xilinx_timer: Fixed deadlock issue
The timer was deadlocking when the interval was set too low. It would cause a
flood of timer events and the CPU would halt indefinately. This is a known issue
and theres a generic workaround in place in ptimer on ptimer_set_limit(),
however the Xilinx timer uses ptimer_set_count() instead of set_limit. Changed
the call to set_count() to an equivalent call of set_limit() instead, which
brings the workaround into play.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xilinx_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c index e8b7a59..b562bd0 100644 --- a/hw/xilinx_timer.c +++ b/hw/xilinx_timer.c @@ -136,7 +136,7 @@ static void timer_enable(struct xlx_timer *xt) count = xt->regs[R_TLR]; else count = ~0 - xt->regs[R_TLR]; - ptimer_set_count(xt->ptimer, count); + ptimer_set_limit(xt->ptimer, count, 1); ptimer_run(xt->ptimer, 1); } |