All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates
@ 2012-06-16  5:20 Peter A. G. Crosthwaite
  2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 1/2] xilinx_timer: Removed include of qemu-timer Peter A. G. Crosthwaite
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter A. G. Crosthwaite @ 2012-06-16  5:20 UTC (permalink / raw)
  To: edgar.iglesias, qemu-devel
  Cc: peter.crosthwaite, pbonzini, peter.chubb, trimarchi,
	john.williams

Patch 1 is trival, just deleted a redundant include that shouldn't be there.
Patch 2 is a major bugfix for Microblaze platforms - the timer was deadlocking
the system.

Peter A. G. Crosthwaite (2):
  xilinx_timer: Removed include of qemu-timer
  xilinx_timer: Fixed deadlock issue

 hw/xilinx_timer.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

-- 
1.7.3.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH v1 1/2] xilinx_timer: Removed include of qemu-timer
  2012-06-16  5:20 [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Peter A. G. Crosthwaite
@ 2012-06-16  5:20 ` Peter A. G. Crosthwaite
  2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 2/2] xilinx_timer: Fixed deadlock issue Peter A. G. Crosthwaite
  2012-06-21 13:23 ` [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Edgar E. Iglesias
  2 siblings, 0 replies; 4+ messages in thread
From: Peter A. G. Crosthwaite @ 2012-06-16  5:20 UTC (permalink / raw)
  To: edgar.iglesias, qemu-devel
  Cc: peter.crosthwaite, pbonzini, peter.chubb, trimarchi,
	john.williams

The Xilinx timer does not interact with the qemu_timer API, so dont include it.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 hw/xilinx_timer.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/hw/xilinx_timer.c b/hw/xilinx_timer.c
index 0683ce1..e8b7a59 100644
--- a/hw/xilinx_timer.c
+++ b/hw/xilinx_timer.c
@@ -23,7 +23,6 @@
  */
 
 #include "sysbus.h"
-#include "qemu-timer.h"
 #include "ptimer.h"
 
 #define D(x)
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH v1 2/2] xilinx_timer: Fixed deadlock issue
  2012-06-16  5:20 [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Peter A. G. Crosthwaite
  2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 1/2] xilinx_timer: Removed include of qemu-timer Peter A. G. Crosthwaite
@ 2012-06-16  5:20 ` Peter A. G. Crosthwaite
  2012-06-21 13:23 ` [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Edgar E. Iglesias
  2 siblings, 0 replies; 4+ messages in thread
From: Peter A. G. Crosthwaite @ 2012-06-16  5:20 UTC (permalink / raw)
  To: edgar.iglesias, qemu-devel
  Cc: peter.crosthwaite, pbonzini, peter.chubb, trimarchi,
	john.williams

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>
---
 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);
 }
 
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates
  2012-06-16  5:20 [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Peter A. G. Crosthwaite
  2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 1/2] xilinx_timer: Removed include of qemu-timer Peter A. G. Crosthwaite
  2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 2/2] xilinx_timer: Fixed deadlock issue Peter A. G. Crosthwaite
@ 2012-06-21 13:23 ` Edgar E. Iglesias
  2 siblings, 0 replies; 4+ messages in thread
From: Edgar E. Iglesias @ 2012-06-21 13:23 UTC (permalink / raw)
  To: Peter A. G. Crosthwaite
  Cc: pbonzini, peter.chubb, qemu-devel, john.williams, trimarchi

On Sat, Jun 16, 2012 at 03:20:57PM +1000, Peter A. G. Crosthwaite wrote:
> Patch 1 is trival, just deleted a redundant include that shouldn't be there.
> Patch 2 is a major bugfix for Microblaze platforms - the timer was deadlocking
> the system.
> 
> Peter A. G. Crosthwaite (2):
>   xilinx_timer: Removed include of qemu-timer
>   xilinx_timer: Fixed deadlock issue


Applied, thanks Peter


> 
>  hw/xilinx_timer.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> -- 
> 1.7.3.2
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-21 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-16  5:20 [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Peter A. G. Crosthwaite
2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 1/2] xilinx_timer: Removed include of qemu-timer Peter A. G. Crosthwaite
2012-06-16  5:20 ` [Qemu-devel] [PATCH v1 2/2] xilinx_timer: Fixed deadlock issue Peter A. G. Crosthwaite
2012-06-21 13:23 ` [Qemu-devel] [PATCH v1 0/2] Xilinx Timer updates Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.