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] [day] [month] [year] [list]
Date:   Thu, 23 Feb 2023 10:04:43 +0000
From:   Akhil R <akhilrajeev@...dia.com>
To:     Thierry Reding <thierry.reding@...il.com>
CC:     "christian.koenig@....com" <christian.koenig@....com>,
        "digetx@...il.com" <digetx@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Laxman Dewangan <ldewangan@...dia.com>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
        "wsa@...nel.org" <wsa@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: [PATCH v2] i2c: tegra: Share same DMA channel for Rx and Tx

> > Allocate only one DMA channel for I2C and share it for both Tx and Rx.
> > Since I2C supports only half duplex, there is no impact on perf with
> > this.
> >
> > Signed-off-by: Akhil R <akhilrajeev@...dia.com>
> > ---
> > v1->v2: Remove WARN_ON for DMA channel mismatch. There is only one
> > channel in use with this change.
> >
> >  drivers/i2c/busses/i2c-tegra.c | 54 ++++++++++------------------------
> >  1 file changed, 15 insertions(+), 39 deletions(-)
> 
> I'm a little confused by this. All device trees already list the very
> same reference for both TX and RX DMA channels in the I2C nodes, so
> these channels are already effectively shared, aren't they?
The value given in DT refers to the slave-id of an I2C instance and not the 
channel number. Each I2C instance was in-effect using two different DMA 
channels with the same slave-id.
This change is to free up the extra DMA channel since both will not be
used simultaneously. 

> 
> So all this does is to get rid of the duplicated pointer? In practice,
> is the DMA channel pointer going to point to the exact same memory or
> are these separate objects that happen to point to the same hardware
> resource?
They are indeed separate hardware resource itself. As I described above,
two separate DMA channels were in use for each I2C instance.

> 
> In either case, I think the commit message should clarify that. Also, a
> few minor nits below...

Agreed with the other comments.

Regards,
Akhil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ