Skip to contentSkip to conversation

fix last cpu timer initialization

PATCH Applied Artyom Tarasenko 2 participants 6 messages Aug 2, 2010 – Aug 15, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix last cpu timer initialization

The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset.

Don't mark non-existing timers as running.

---
 hw/slavio_timer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/slavio_timer.c +2 -2
index d787553..c125de4 100644
@@ -377,12 +377,12 @@ static void slavio_timer_reset(DeviceState *d)
         curr_timer->limit = 0;
         curr_timer->count = 0;
         curr_timer->reached = 0;
-        if (i < s->num_cpus) {
+        if (i <= s->num_cpus) {
             ptimer_set_limit(curr_timer->timer,
                              LIMIT_TO_PERIODS(TIMER_MAX_COUNT32), 1);
             ptimer_run(curr_timer->timer, 0);
+            curr_timer->running = 1;
         }
-        curr_timer->running = 1;
     }
     s->cputimer_mode = 0;
 }
Signature · 1 line
1.6.2.5
Applied
#1 lore raw

Thanks, applied. Please remember to use Signed-off-by tag.

Quoted 31 lines · Artyom Tarasenko

The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset.

Don't mark non-existing timers as running.
---
 hw/slavio_timer.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/slavio_timer.c +2 -3
index d787553..c125de4 100644
@@ -377,12 +377,12 @@ static void slavio_timer_reset(DeviceState *d)
         curr_timer->limit = 0;
         curr_timer->count = 0;
         curr_timer->reached = 0;
-        if (i < s->num_cpus) {
+        if (i <= s->num_cpus) {
             ptimer_set_limit(curr_timer->timer,
                              LIMIT_TO_PERIODS(TIMER_MAX_COUNT32), 1);
             ptimer_run(curr_timer->timer, 0);
+            curr_timer->running = 1;
         }
-        curr_timer->running = 1;
     }
     s->cputimer_mode = 0;
  }
--

1.6.2.5

#2 lore raw

Btw, it would be nice to get this patch applied for 0.13: it's a pure fix, and it allows running the OBP v2.10 for LX and some older OBP versions for SS-20 too.

2010/8/2 Blue Swirl <[email protected]>:

Quoted 1 line

Thanks, applied. Please remember to use Signed-off-by tag.

Grrr. Git 1.6.2.5 seems to ignore the option signoff = true in the config file. I'll update my git right now.

Quoted 36 lines
Quoted 31 lines · Artyom Tarasenko

The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset.

Don't mark non-existing timers as running.
---
 hw/slavio_timer.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/slavio_timer.c +2 -3
index d787553..c125de4 100644
@@ -377,12 +377,12 @@ static void slavio_timer_reset(DeviceState *d)
         curr_timer->limit = 0;
         curr_timer->count = 0;
         curr_timer->reached = 0;
-        if (i < s->num_cpus) {
+        if (i <= s->num_cpus) {
             ptimer_set_limit(curr_timer->timer,
                              LIMIT_TO_PERIODS(TIMER_MAX_COUNT32), 1);
             ptimer_run(curr_timer->timer, 0);
+            curr_timer->running = 1;
         }
-        curr_timer->running = 1;
     }
     s->cputimer_mode = 0;
  }
--

1.6.2.5

Signature · 4 lines
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/
#3 lore raw

2010/8/2 Artyom Tarasenko <[email protected]>:

Quoted 3 lines

Btw, it would be nice to get this patch applied for 0.13: it's a pure fix, and it allows running the OBP v2.10 for LX and some older OBP versions for SS-20 too.

ping? Objections?

Quoted 42 lines

2010/8/2 Blue Swirl <[email protected]>:

Quoted 1 line

Thanks, applied. Please remember to use Signed-off-by tag.

Grrr. Git 1.6.2.5 seems to ignore the option signoff = true in the config file. I'll update my git right now.

Quoted 36 lines
Quoted 31 lines · Artyom Tarasenko

The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset.

Don't mark non-existing timers as running.
---
 hw/slavio_timer.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/slavio_timer.c +2 -3
index d787553..c125de4 100644
@@ -377,12 +377,12 @@ static void slavio_timer_reset(DeviceState *d)
         curr_timer->limit = 0;
         curr_timer->count = 0;
         curr_timer->reached = 0;
-        if (i < s->num_cpus) {
+        if (i <= s->num_cpus) {
             ptimer_set_limit(curr_timer->timer,
                              LIMIT_TO_PERIODS(TIMER_MAX_COUNT32), 1);
             ptimer_run(curr_timer->timer, 0);
+            curr_timer->running = 1;
         }
-        curr_timer->running = 1;
     }
     s->cputimer_mode = 0;
  }
--

1.6.2.5

Signature · 4 lines
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/
#4 lore raw

2010/8/6 Artyom Tarasenko <[email protected]>:

Quoted 7 lines

2010/8/2 Artyom Tarasenko <[email protected]>:

Quoted 3 lines

Btw, it would be nice to get this patch applied for 0.13: it's a pure fix, and it allows running the OBP v2.10 for LX and some older OBP versions for SS-20 too.

ping? Objections?

No feedback? Are 0.13 patches only accepted with "0.13" in the subject line? Are sparc patches generally not welcome for the stable release?

Quoted 50 lines
Quoted 42 lines

2010/8/2 Blue Swirl <[email protected]>:

Quoted 1 line

Thanks, applied. Please remember to use Signed-off-by tag.

Grrr. Git 1.6.2.5 seems to ignore the option signoff = true in the config file. I'll update my git right now.

Quoted 36 lines
Quoted 31 lines · Artyom Tarasenko

The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset.

Don't mark non-existing timers as running.
---
 hw/slavio_timer.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/slavio_timer.c +2 -3
index d787553..c125de4 100644
@@ -377,12 +377,12 @@ static void slavio_timer_reset(DeviceState *d)
         curr_timer->limit = 0;
         curr_timer->count = 0;
         curr_timer->reached = 0;
-        if (i < s->num_cpus) {
+        if (i <= s->num_cpus) {
             ptimer_set_limit(curr_timer->timer,
                              LIMIT_TO_PERIODS(TIMER_MAX_COUNT32), 1);
             ptimer_run(curr_timer->timer, 0);
+            curr_timer->running = 1;
         }
-        curr_timer->running = 1;
     }
     s->cputimer_mode = 0;
  }
--

1.6.2.5

--
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/

Signature · 4 lines
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/
#5 lore raw
Quoted 11 lines · Artyom Tarasenko

2010/8/6 Artyom Tarasenko <[email protected]>:

Quoted 7 lines

2010/8/2 Artyom Tarasenko <[email protected]>:

Quoted 3 lines

Btw, it would be nice to get this patch applied for 0.13: it's a pure fix, and it allows running the OBP v2.10 for LX and some older OBP versions for SS-20 too.

ping? Objections?

No feedback? Are 0.13 patches only accepted with "0.13" in the subject line? Are sparc patches generally not welcome for the stable release?

This depends on 0.13 release strategy. I suppose that there will be another -rc, but it can be based on master or it can be based on -rc0 with cherry picking from master.

Quoted 59 lines
Quoted 44 lines
Quoted 42 lines

2010/8/2 Blue Swirl <[email protected]>:

Quoted 1 line

Thanks, applied. Please remember to use Signed-off-by tag.

Grrr. Git 1.6.2.5 seems to ignore the option signoff = true in the config file. I'll update my git right now.

Quoted 36 lines
Quoted 31 lines · Artyom Tarasenko

The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset.

Don't mark non-existing timers as running.
---
 hw/slavio_timer.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/slavio_timer.c +2 -3
index d787553..c125de4 100644
@@ -377,12 +377,12 @@ static void slavio_timer_reset(DeviceState *d)
         curr_timer->limit = 0;
         curr_timer->count = 0;
         curr_timer->reached = 0;
-        if (i < s->num_cpus) {
+        if (i <= s->num_cpus) {
             ptimer_set_limit(curr_timer->timer,
                              LIMIT_TO_PERIODS(TIMER_MAX_COUNT32), 1);
             ptimer_run(curr_timer->timer, 0);
+            curr_timer->running = 1;
         }
-        curr_timer->running = 1;
     }
     s->cputimer_mode = 0;
  }
--

1.6.2.5

Quoted 6 lines

--
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/

--
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/