Subject: Re: [RFC PATCH 1/2] irqchip: ti-tsir: Add support for Timesync Interrupt Router

From: Thomas Gleixner <[email-masked]>
Date: Mon, 10 Feb 2025 21:03:15 +0100

Chintan!

On Sun, Feb 09 2025 at 14:06, Vankar, Chintan wrote:
> On 2/7/2025 2:58 AM, Thomas Gleixner wrote:
>> On Wed, Feb 05 2025 at 21:31, Chintan Vankar wrote:
>>> +static struct irq_chip ts_intr_irq_chip = {
>>> +	.name			= "TIMESYNC_INTRTR",
>>> +};
>> 
>> How is this interrupt chip supposed to work? All it implements is a
>> name.
>> 
>
> Timesync INTR can be used to map input sources with the corresponding
> output, so that we can configure specific functionality for the device
> that is using this output sources either as an interrupt source or to
> synchronize the time.
>
> To implement above Timesync INTR's functionality, I have implemented
> ts_intr_irq_domain_alloc() and ts_intr_irq_domain_free() ops which are
> sufficient. Let me know if they are fine.
>>> +
>>> +	tsr_data.domain = irq_domain_create_tree(&node->fwnode, &ts_intr_irq_domain_ops, &tsr_data);
>> 
>> So this instantiates a interrupt domain which is completely disconnected
>> from the rest of the world.
>>  > How is the output side of this supposed to handle an interrupt which is
>> routed to it?
>> 
>
>                          ________________________
>                         |    Timesync INTR       +---->dma_local_events
>                         |                        |
> Device sync events----->                        +---->pcie_cpts_hw_push
>                         |                        |
>           cpts_genf----->                        +---->cpts_hw_push
>                         |________________________|
>
>
> No it is connected, it is being used to configure the output for
> Timesync INTR as mentioned above.
>
> As seen in the diagram, Timesync INTR has multiple output interfaces and
> we can configure those to map them with the corresponding input as
> required by peripherals which receives the signal. In context of this
> series, CPTS module is utilizing the output signal of cpts_genf as
> Hardware timestamp push event to generate timestamps at 1 seconds

If I understand this correctly, then the interrupt number you need to
allocate for this is never going to be requested. If it would be
requested it just would do nothing and the handler would never be
invoked, right?

The allocation just establishes the routing of a signal between two
arbitrary IP blocks in the SoC.

So the question is what has this to do with interrupts in the first
place?

Thanks,

        tglx