Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1716692
| From | Mason <slash.tmp@free.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6] irqchip: Add support for tango interrupt router |
| Date | 2017-08-21 18:20 +0200 |
| Message-ID | <ugXAL-6Cy-43@gated-at.bofh.it> (permalink) |
| References | (8 earlier) <u4BFE-3wF-17@gated-at.bofh.it> <u79Wx-4x9-1@gated-at.bofh.it> <u9IGu-6pq-25@gated-at.bofh.it> <ubPDQ-8gK-13@gated-at.bofh.it> <ugCcW-1rF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 20/08/2017 19:22, Mason wrote:
> On 07/08/2017 14:47, Marc Zyngier wrote:
>
>> On 01/08/17 17:56, Mason wrote:
>>
>>> +static int tango_set_type(struct irq_data *data, uint flow_type)
>>> +{
>>> + return 0;
>>
>> What does this mean? Either you can do a set-type (and you do it), or
>> you cannot, and you fail. At least you check that what you're asked to
>> do matches the configuration.
>
> IIRC, __irq_set_trigger() barfed when I did it differently.
The way the problem manifests is that /proc/interrupts cannot
determine the trigger types.
(I think the issue might be deeper than this cosmetic aspect.)
# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
40: 1832 333 2378 471 GIC-0 29 Edge twd
41: 487 0 0 0 mapper 1 Edge serial
44: 50 0 0 0 mapper 38 Edge eth0
51: 3 0 0 0 mapper 37 Edge phy_interrupt
(1 and 38 are actually level interrupts.)
ret = sprintf(buf, "%s\n",
irqd_is_level_type(&desc->irq_data) ? "level" : "edge");
__irq_set_trigger() is a no-op when irq_set_type is not implemented.
But if the callback returns 0, then __irq_set_trigger() eventually calls
irqd_clear(&desc->irq_data, IRQD_TRIGGER_MASK);
irqd_set(&desc->irq_data, flags);
Should I be calling irqd_get_trigger_type() myself earlier,
perhaps in the domain alloc function?
That's what drivers/irqchip/irq-pic32-evic.c seems to do.
The comment seems to state otherwise though:
/*
* Must only be called inside irq_chip.irq_set_type() functions.
*/
static inline void irqd_set_trigger_type(struct irq_data *d, u32 type)
Regards.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6] irqchip: Add support for tango interrupt router Mason <slash.tmp@free.fr> - 2017-08-20 19:30 +0200
Re: [PATCH v6] irqchip: Add support for tango interrupt router Mason <slash.tmp@free.fr> - 2017-08-21 18:20 +0200
Re: [PATCH v6] irqchip: Add support for tango interrupt router Marc Zyngier <marc.zyngier@arm.com> - 2017-08-23 13:00 +0200
Re: [PATCH v6] irqchip: Add support for tango interrupt router Mason <slash.tmp@free.fr> - 2017-08-23 17:50 +0200
csiph-web