Commit db2a0783 authored by Jan Kiszka's avatar Jan Kiszka Committed by Philippe Gerum

ipipe: Call present ack and end handlers for timer irq unconditionally

These steps must be done unconditionally, because if
__ipipe_ack_hrtimer_irq() is called, the tick event will be delivered to
the head domain next, which will neither call ipipe_end() for a tick
event, nor propagate such event to the root stage (at least not using
the same IRQ line).

This plugs a race for timers that are per-CPU but share the same
interrupt number. When setting them up, there is a window where the
first CPU already called ipipe_request_irq, but some other CPU did not
yet ran through grab_timer, thus have ipipe_stolen = 0.

It also solves boot issues with the TSC deadline timer in use.

Based on reasoning provided by Philippe Gerum.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 6a566ee1
......@@ -352,15 +352,18 @@ static void __ipipe_ack_hrtimer_irq(struct irq_desc *desc)
{
struct ipipe_timer *timer = __ipipe_raw_cpu_read(percpu_timer);
/*
* Pseudo-IRQs like pipelined IPIs have no descriptor, we have
* to check for this.
*/
if (desc)
desc->ipipe_ack(desc);
if (timer->host_timer->ipipe_stolen) {
if (timer->ack)
timer->ack();
if (desc)
desc->ipipe_end(desc);
}
}
static int do_set_oneshot(struct clock_event_device *cdev)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment