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]
Message-ID:
 <SA1PR12MB8120E7DFF29A8EDF96C14946955EA@SA1PR12MB8120.namprd12.prod.outlook.com>
Date: Thu, 24 Jul 2025 09:45:09 +0000
From: "Verma, Devendra" <Devendra.Verma@....com>
To: Vinod Koul <vkoul@...nel.org>
CC: "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mani@...nel.org" <mani@...nel.org>
Subject: RE: [RESEND PATCH] dmaengine: dw-edma: Add Simple Mode Support

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Vinod

Please check the response inline.

Regards,
Devendra

> -----Original Message-----
> From: Vinod Koul <vkoul@...nel.org>
> Sent: Wednesday, July 23, 2025 12:51
> To: Verma, Devendra <Devendra.Verma@....com>
> Cc: dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org; mani@...nel.org
> Subject: Re: [RESEND PATCH] dmaengine: dw-edma: Add Simple Mode Support
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On 02-07-25, 09:38, Verma, Devendra wrote:
> > > On 23-06-25, 11:47, Devendra K Verma wrote:
> > > > The HDMA IP supports the simple mode (non-linked list).
> > > > In this mode the channel registers are configured to initiate a
> > > > single DMA data transfer. The channel can be configured in simple
> > > > mode via peripheral param of dma_slave_config param.
> > > >
> > > > Signed-off-by: Devendra K Verma <devverma@....com>
> > > > ---
> > > >  drivers/dma/dw-edma/dw-edma-core.c    | 10 +++++
> > > >  drivers/dma/dw-edma/dw-edma-core.h    |  2 +
> > > >  drivers/dma/dw-edma/dw-hdma-v0-core.c | 53
> > > ++++++++++++++++++++++++++-
> > > >  include/linux/dma/edma.h              |  8 ++++
> > > >  4 files changed, 72 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/dma/dw-edma/dw-edma-core.c
> > > > b/drivers/dma/dw-edma/dw-edma-core.c
> > > > index c2b88cc99e5d..4dafd6554277 100644
> > > > --- a/drivers/dma/dw-edma/dw-edma-core.c
> > > > +++ b/drivers/dma/dw-edma/dw-edma-core.c
> > > > @@ -235,9 +235,19 @@ static int dw_edma_device_config(struct
> > > > dma_chan
> > > *dchan,
> > > >                                struct dma_slave_config *config)  {
> > > >       struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
> > > > +     struct dw_edma_peripheral_config *pconfig = config->peripheral_config;
> > > > +     unsigned long flags;
> > > > +
> > > > +     if (WARN_ON(config->peripheral_config &&
> > > > +                 config->peripheral_size != sizeof(*pconfig)))
> > > > +             return -EINVAL;
> > > >
> > > > +     spin_lock_irqsave(&chan->vc.lock, flags);
> > > >       memcpy(&chan->config, config, sizeof(*config));
> > > > +
> > > > +     chan->non_ll_en = pconfig ? pconfig->non_ll_en : false;
> > > >       chan->configured = true;
> > > > +     spin_unlock_irqrestore(&chan->vc.lock, flags);
> > > >
> > > >       return 0;
> > > >  }
> > > > diff --git a/drivers/dma/dw-edma/dw-edma-core.h
> > > > b/drivers/dma/dw-edma/dw-edma-core.h
> > > > index 71894b9e0b15..c0266976aa22 100644
> > > > --- a/drivers/dma/dw-edma/dw-edma-core.h
> > > > +++ b/drivers/dma/dw-edma/dw-edma-core.h
> > > > @@ -86,6 +86,8 @@ struct dw_edma_chan {
> > > >       u8                              configured;
> > > >
> > > >       struct dma_slave_config         config;
> > > > +
> > > > +     bool                            non_ll_en;
> > >
> > > why do you need this? What is the decision to use non ll vs ll one?
> >
> > The IP supports both the modes, LL mode and non-LL mode.
> > In the current driver code, the support for non-LL mode is not
> > present. This patch enables the non-LL aka simple mode support by
> > means of the peripheral_config option in the dmaengine_slave_config.
>
> That does not answer my question, what decides which mode should be used?
>

Simple HDMA mode is useful when there is no need for scatter-gather and
one big chunk of data from contiguous location is to be moved. It saves the effort of
preparing a linked list of descriptors as DMA channel registers can be programmed
directly.

> --
> ~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ