Re: [PATCH 1/1] irq: add IRQF_TRIGGER_MASK on PPI by default

From: Jon Hunter
Date: Fri Mar 31 2017 - 04:13:29 EST



On 31/03/17 09:01, Thomas Gleixner wrote:
> On Thu, 30 Mar 2017, Aniruddha Banerjee wrote:
>
>> add IRQF_TRIGGER_MASK on PPI by default so that the PPIs are
>> not configured as edge-triggered, which may be wrong for certain GIC
>> implementations such as the GIC-400
>
> The above is just useless blurb.
>
> I can't figure out at all WHY a generic interface has anything to do with
> edge trigger configuration.

I have to agree, it does not make sense in the context of the patch. The
only thing I can think of that this is trying to circumvent the lookup
of the trigger type in __setup_irq() ...

/*
* If the trigger type is not specified by the caller,
* then use the default for this interrupt.
*/
if (!(new->flags & IRQF_TRIGGER_MASK))
new->flags |= irqd_get_trigger_type(&desc->irq_data);

If that is the case, then this does not look correct to me and will most
likely breaking percpu interrupts that do need to lookup the type.

> I assume this is (Nvidia) GIC specific nonsense, so why are you inflicting
> this on every caller of this interface unconditionally w/o explaining what
> the impact of this change might be and why it does not cause havoc for any
> existing caller?

Yes, however, some new nonsense I am not aware of :-(

Aniruddha, why can we not just set the type correctly for the PPI in the
device-tree file and avoid this?

Cheers
Jon

--
nvpublic