Skip to content
Snippets Groups Projects
Commit 5933e8a9 authored by Artyom Tarasenko's avatar Artyom Tarasenko Committed by Blue Swirl
Browse files

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.

Signed-off-by: default avatarArtyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent ad7ee4ad
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment