Hi Lina,
On 19/10/18 16:32, Lina Iyer wrote:
Hi folks,
On Wed, Oct 10 2018 at 18:30 -0600, Lina Iyer wrote:
:) Thanks for your time.+static irqreturn_t wake_irq_gpio_handler(int irq, void *data)Do we see any problem calling handle_irq()?
+{
+ struct irq_data *irqd = data;
+ struct irq_desc *desc = irq_to_desc(irqd->irq);
+
+ desc->handle_irq(desc);
Good timing, I was just looking at this.
One thing I can see is that you will end-up calling the EOI callback onOh, thanks Marc. Will look into it. The problem is because I call
the root interrupt controller (the GIC), thus writing to ICC_EOIR1_EL1.
But you've never acked this interrupt the first place by reading
ICC_IAR1_EL1, and that puts you violently out of spec, according to the
GICv3 spec (8.2.10), which reads:
"A write to this register must correspond to the most recent valid read
by this PE from an Interrupt Acknowledge Register, and must correspond
to the INTID that was read from ICC_IAR1_EL1, otherwise the system
behavior is UNPREDICTABLE."
Here, you definitely risk the sanity of the CPU interface state machine.
So stepping back a bit: At some point, you had a version that justThere are some unnecessary complexity with the approach that we are
relied on regenerating edge interrupts by writing to some register
(knowing that level interrupts are safe by definition). Why isn't that
the right solution? It'd avoid the above minefield by just letting the
HW do its thing...