* A gic problem about eoi
@ 2016-02-18 5:00 Yang Yingliang
2016-02-18 9:00 ` Marc Zyngier
0 siblings, 1 reply; 4+ messages in thread
From: Yang Yingliang @ 2016-02-18 5:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi, Marc
We found if hardware clear pending and active status is slower than
software handling, the new sgi will be merged because of hardware
status. The new sgi will be lost.
If we add a dsb instruction after gic_write_eoir(), it can avoid this
case happening.
Is it a right way to add a dsb instruction after gic_write_eoir()
in current gic driver code ?
Thanks,
Yang
^ permalink raw reply [flat|nested] 4+ messages in thread
* A gic problem about eoi
2016-02-18 5:00 A gic problem about eoi Yang Yingliang
@ 2016-02-18 9:00 ` Marc Zyngier
2016-02-19 6:39 ` Yang Yingliang
0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2016-02-18 9:00 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 18 Feb 2016 13:00:58 +0800
Yang Yingliang <yangyingliang@huawei.com> wrote:
Hi Yang,
> Hi, Marc
>
> We found if hardware clear pending and active status is slower than
> software handling, the new sgi will be merged because of hardware
> status. The new sgi will be lost.
>
> If we add a dsb instruction after gic_write_eoir(), it can avoid this
> case happening.
>
> Is it a right way to add a dsb instruction after gic_write_eoir()
> in current gic driver code ?
I suspect your problem is not so much the EOI, but that the read of
ICC_IAR1_EL1 doesn't propagate the Ack quickly enough, leading to the
transition from pending to active to still be in flux when the interrupt
is EOIed. This is where a DSB is required (and was missing until very
recently).
Does 1a1ebd5 ("irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is
visible on redestributor") solve your problem?
Thanks,
M.
--
Jazz is not dead. It just smells funny.
^ permalink raw reply [flat|nested] 4+ messages in thread* A gic problem about eoi
2016-02-18 9:00 ` Marc Zyngier
@ 2016-02-19 6:39 ` Yang Yingliang
2016-02-19 11:49 ` Marc Zyngier
0 siblings, 1 reply; 4+ messages in thread
From: Yang Yingliang @ 2016-02-19 6:39 UTC (permalink / raw)
To: linux-arm-kernel
On 2016/2/18 17:00, Marc Zyngier wrote:
> On Thu, 18 Feb 2016 13:00:58 +0800
> Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> Hi Yang,
>
>> Hi, Marc
>>
>> We found if hardware clear pending and active status is slower than
>> software handling, the new sgi will be merged because of hardware
>> status. The new sgi will be lost.
>>
>> If we add a dsb instruction after gic_write_eoir(), it can avoid this
>> case happening.
>>
>> Is it a right way to add a dsb instruction after gic_write_eoir()
>> in current gic driver code ?
>
> I suspect your problem is not so much the EOI, but that the read of
> ICC_IAR1_EL1 doesn't propagate the Ack quickly enough, leading to the
> transition from pending to active to still be in flux when the interrupt
> is EOIed. This is where a DSB is required (and was missing until very
> recently).
>
> Does 1a1ebd5 ("irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is
> visible on redestributor") solve your problem?
I tested this patch, it can solve the problem.
Will this patch queue to stable ?
^ permalink raw reply [flat|nested] 4+ messages in thread* A gic problem about eoi
2016-02-19 6:39 ` Yang Yingliang
@ 2016-02-19 11:49 ` Marc Zyngier
0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2016-02-19 11:49 UTC (permalink / raw)
To: linux-arm-kernel
On 19/02/16 06:39, Yang Yingliang wrote:
>
>
> On 2016/2/18 17:00, Marc Zyngier wrote:
>> On Thu, 18 Feb 2016 13:00:58 +0800
>> Yang Yingliang <yangyingliang@huawei.com> wrote:
>>
>> Hi Yang,
>>
>>> Hi, Marc
>>>
>>> We found if hardware clear pending and active status is slower than
>>> software handling, the new sgi will be merged because of hardware
>>> status. The new sgi will be lost.
>>>
>>> If we add a dsb instruction after gic_write_eoir(), it can avoid this
>>> case happening.
>>>
>>> Is it a right way to add a dsb instruction after gic_write_eoir()
>>> in current gic driver code ?
>>
>> I suspect your problem is not so much the EOI, but that the read of
>> ICC_IAR1_EL1 doesn't propagate the Ack quickly enough, leading to the
>> transition from pending to active to still be in flux when the interrupt
>> is EOIed. This is where a DSB is required (and was missing until very
>> recently).
>>
>> Does 1a1ebd5 ("irqchip/gic-v3: Make sure read from ICC_IAR1_EL1 is
>> visible on redestributor") solve your problem?
>
> I tested this patch, it can solve the problem.
>
> Will this patch queue to stable ?
Yes - It may not directly apply to older versions, but it is pretty
trivial to backport.
Thanks for testing,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-19 11:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 5:00 A gic problem about eoi Yang Yingliang
2016-02-18 9:00 ` Marc Zyngier
2016-02-19 6:39 ` Yang Yingliang
2016-02-19 11:49 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).