lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 22 Oct 2019 14:46:03 +0300
From:   Peter Ujfalusi <peter.ujfalusi@...com>
To:     Rob Herring <robh@...nel.org>
CC:     Nishanth Menon <nm@...com>, <devicetree@...r.kernel.org>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Lokesh Vutla <lokeshvutla@...com>, Keerthy <j-keerthy@...com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Tero Kristo <t-kristo@...com>,
        Tony Lindgren <tony@...mide.com>, Vinod <vkoul@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        "open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM" 
        <dmaengine@...r.kernel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 07/14] dt-bindings: dma: ti: Add document for K3 UDMA



On 17/10/2019 17.03, Rob Herring wrote:
> On Tue, Oct 15, 2019 at 12:29 PM Peter Ujfalusi <peter.ujfalusi@...com> wrote:
>>
>> Rob,
>>
>> On 10/11/19 10:30 AM, Peter Ujfalusi wrote:
>>>
>>> I have already moved the TR vs Packet mode channel selection, which does
>>> make sense as it was Linux's choice to use TR for certain cases.
>>>
>>> If I move these to code then we need to have big tables
>>> struct psil_config am654_psil[32767] = {};
>>> struct psil_config j721e_psil[32767] = {};
>>
>> After thinking about this a bit more, I think we can move all the PSI-L
>> endpoint configuration to the kernel as not all the 32767 threads are
>> actually in use. Sure it is going to be some amount of static data in
>> the kernel, but it is an acceptable compromise.
>>
>> The DMA binding can look like this:
>>
>> dmas = <&main_udmap 0xc400>,
>>        <&main_udmap 0x4400>;
>> dma-names = "tx", "rx";
>>
>> or
>> dmas = <&main_udmap 0x4400 UDMA_DIR_TX>,
>>        <&main_udmap 0x4400 UDMA_DIR_RX>;
>> dma-names = "tx", "rx";
>>
>> If I keep the direction.
>> 0xc400 is destination ID, which is 0x4400 | 0x8000 as per PSI-L
>> specification.
>> In the TRM only the source threads can be found as a map (thread IDs <
>> 0x7fff), but the binding document can cover this.
>>
>> This way we don't need another dtsi file and I can create the map in the
>> kernel.
>>
>> This will hide some details of the HW from DT, but since the PSI-L
>> thread configuration is static in hardware I believe it is acceptable.
>>
>> However we still have uncovered features in the binding or in code, like
>> a case when the RX does not have access to the DMA channel, only flows.
>> Not sure if I should reserve the direction parameter as an indication to
>> this or find other way.
>> Basically we communicate on the given PSI-L thread without having a DMA
>> channel as other core is owning the channel.
>>
>> What do you think?
> 
> Seems like a reasonable solution

OK, I'll go ahead and implement the PSI-L thread representation to the
kernel.

> though I don't really follow the last issue.

In this DMA for RX (DEV_TO_MEM) we need the source thread paired to
UDMAP receive channel to get data flowing.
The arriving packets within PSI-L are directed by flowID to a specific
receive flow configuration which describe the ring from where UDMAP
should pick up the descriptor and to where the completed one should be
placed for the SW.

There are cases when Linux for example does not have access to the
receive channel at all, it is handled by another core, but certain
receive flow(s) are given to Linux so they can receive packets.
In this case we do RX DMA without actual DMA channel.

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ