diff mbox

[v1,1/1] hw/ptimer: Do not artificially limit timers when using icount

Message ID 1430709529-4653-1-git-send-email-edgar.iglesias@gmail.com
State New
Headers show

Commit Message

Edgar E. Iglesias May 4, 2015, 3:18 a.m. UTC
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/core/ptimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini May 4, 2015, 9:27 a.m. UTC | #1
On 04/05/2015 05:18, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> 
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
>  hw/core/ptimer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
> index 2abad1f..8437bd6 100644
> --- a/hw/core/ptimer.c
> +++ b/hw/core/ptimer.c
> @@ -189,7 +189,7 @@ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload)
>       * on the current generation of host machines.
>       */
>  
> -    if (limit * s->period < 10000 && s->period) {
> +    if (!use_icount && limit * s->period < 10000 && s->period) {
>          limit = 10000 / s->period;
>      }
>  
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Edgar E. Iglesias May 8, 2015, 7:35 a.m. UTC | #2
On Mon, May 04, 2015 at 11:27:36AM +0200, Paolo Bonzini wrote:
> 
> 
> On 04/05/2015 05:18, Edgar E. Iglesias wrote:
> > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> > 
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> > ---
> >  hw/core/ptimer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
> > index 2abad1f..8437bd6 100644
> > --- a/hw/core/ptimer.c
> > +++ b/hw/core/ptimer.c
> > @@ -189,7 +189,7 @@ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload)
> >       * on the current generation of host machines.
> >       */
> >  
> > -    if (limit * s->period < 10000 && s->period) {
> > +    if (!use_icount && limit * s->period < 10000 && s->period) {
> >          limit = 10000 / s->period;
> >      }
> >  
> > 
> 
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks, I've applied this one.

Cheers,
Edgar
diff mbox

Patch

diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 2abad1f..8437bd6 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -189,7 +189,7 @@  void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload)
      * on the current generation of host machines.
      */
 
-    if (limit * s->period < 10000 && s->period) {
+    if (!use_icount && limit * s->period < 10000 && s->period) {
         limit = 10000 / s->period;
     }