[PATCH] genirq: Introduce irq_read_line()

Marc Zyngier marc.zyngier at arm.com
Sat Oct 25 02:22:57 PDT 2014


On Sat, Oct 25 2014 at 12:12:55 am BST, Bjorn Andersson <bjorn at kryo.se> wrote:
> On Fri, Oct 24, 2014 at 10:59 AM, Marc Zyngier <marc.zyngier at arm.com> wrote:
>> I just pushed out a branch:
>> git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
>> irq/irqchip_state
>>
>> Please let me know if that's useful for you.
>>
>
> I think that my irq_read_line() would be equivalent of
> irq_get_irqchip_state(IRQCHIP_STATE_PENDING), i.e. the state of the
> interrupt ignoring masking. And the rest would be EINVAL.
> So I think this would work out just fine for us!

Excellent.

> Is ACTIVE the line level with the mask considered and setting ACTIVE,
> would that be the same as acking the interrupt?

ACTIVE describes the state that exists once the interrupt has been
ACKed, and before it has been EOIed. It indicates an interrupt "in
progress".

It probably doesn't make any sense for most users, but is extremely
useful with KVM: when a device is shared between VMs (most obvious one
is a simple timer), the interrupt state is part of the whole context,
and must be save/restored as well.

> What's the expected behaviour of setting PENDING?

Its expected behaviour is to inject an interrupt, just as if the device
signaled an interrupt. Probably not easy to implement on anything but
the ARM GICs.

> I would appreciate if you commented the state enum, to make it obvious
> what pending and active means.

Done. I'll probably post this today.

Thanks,

	M.
-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list