Re: [PATCH v2 2/2] irqchip/ti-sci-inta: Add support for unmapped event handling
From: Peter Ujfalusi
Date: Thu Oct 01 2020 - 07:43:02 EST
On 30/09/2020 16.13, Marc Zyngier wrote:
> On 2020-09-30 11:01, Peter Ujfalusi wrote:
>> On 30/09/2020 11.33, Marc Zyngier wrote:
>>> On 2020-09-30 08:45, Peter Ujfalusi wrote:
>>>> The DMA (BCDMA/PKTDMA and their rings/flows) events are under the
>>>> INTA's
>>>> supervision as unmapped events in AM64.
>>>
>>> What does "unmapped event" mean? An event that doesn't require a
>>> mapping?
>>> Or an internally generated event? Or a proxy event?
>>>
>>>>
>>>> In order to keep the current SW stack working, the INTA driver must
>>>> replace
>>>> the dev_id with it's own when a request comes for BCDMA or PKTDMA
>>>> resources.
>>>
>>> This seems to support my second option. Please clarify what you mean
>>> exactly.
>>
>> In previous devices with NAVSS we had event registers in UDMAP and in
>> rings.
>> In AM64 with DMSS these event registers have been removed from the DMAs
>> (rings are part of the DMAs).
>> The event configuration registers in DMSS are part of the INTA and they
>> under 'unmapped events'.
>
> Is "unmapped events" an official TI wording, described as such in the TRM?
Yes, this is the exact term.
>>
>> In essence the difference boils down to the fact that we do not
>> configure event numbers (to be consumed by INTA) for the events coming
>> from DMAs, but they already have their specific offsets within INTA's
>> unmapped region.
>
> OK, so they are not "unmapped". They are just permanently mapped, aren't
> they?
The reason why these events are called as unmapped events is because
they are _not_ contained within the SoC level global event map -> they
are not mapped events -> unmapped events.
SW should be treating the unmapped event list as global events using
separate address mapping.
The mapped and unmapped event map space exists in parallel if we put it
this way.
>> With this change in hardware we can not use the DMA's ti_sci device
>> identification number to configure these events to produce interrupts,
>> they are under INTA.
>>
>> The only difference in ti_sci API is that for DMA related
>> interrupts/events we need to use the INTA's ti_sci device identification
>> number in place of the DMA component's.
>>
>> I would say that I would describe the unmapped events with your first
>> option. They kind of not require mapping from the source to INTA. The
>> source of the event (DMA, ring) is pre-configured to send specific
>> events to target the unmapped event area at specific offsets.
>
> If they truly don't require a mapping, why is this patch actually mapping
> them with the INTA as a source? Your explanation doesn't make much sense
> to me.
In DMSS lots of optimization went into the HW and one of them was to
remove the Output Event Steering Registers (OESR) from the DMAs and it's
rings. Well, not remove, but not add them as we have new DMAs.
Now INTA have a section to handle the unmapped events via the new
Unmapped Event Mapping Block.
This provides similar functionality as OESR did when they were present
on the parent IP. It also have the possibility to directly do unmapped
to virtual interrupt mapping, skipping the unmapped -> global event ->
local event flow.
The new INTA in DMSS supports the original global event to local event
handling (for ringacc for example) and it introduced these new unmapped
events.
To configure either type (mapped or unmapped global events) we have a
single API from SYSFW.
For mapped events the src_id is the source device identification (ring,
DMA channel, etc).
For unmapped events the src_id is the device identification number of
the INTA where the unmapped event is handled.
For mapped events we have OESR register in the source peripheral's
register space, this does not exists for unmapped event sources.
With the "ti,unmapped-event-sources" points to the devices from where
these unmapped events are originating and the inta driver will use the
appropriate src_id for SYSFW so client drivers do not need to know and
care about the differences between the two INTA.
>> But in the unmapped event register one can still define either:
>> - to send a global event (to be used as trigger or for other purposes)
>> - to generate interrupt (in a similar way as the IMAP registers were
>> doing in NAVSS).
>>
>> I'm not sure if this answers your question...
>
> I still believe the term "unmapped event" doesn't describe what we have
> here. These events seems, at least from what the patch does, internally
> generated by the INTA.
The INTA driver is ti-sci-inta, it relies on SYSFW interface solely, the
hardware is abstracted by the interrupt API: TISCI_MSG_RM_IRQ_SET and
TISCI_MSG_RM_IRQ_RELEASE.
But I do agree that the lack of OESR in the new DMA components and the
unmapped events can be viewed and implemented in a different way.
> Irrespective of this, my other comments still stand.
>
> M.
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki