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:	Wed, 21 Sep 2011 13:01:24 +0530
From:	Jassi Brar <jaswinder.singh@...aro.org>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	dan.j.williams@...el.com, linux-kernel@...r.kernel.org,
	rmk@....linux.org.uk, 21cnbao@...il.com
Subject: Re: [PATCHv3] DMAEngine: Define interleaved transfer request api

On 21 September 2011 12:21, Vinod Koul <vinod.koul@...el.com> wrote:
>> >> > Also for slave transfers, how do we infer direction?
>> >> I already explained to Barry.  Here's it again.
>> >>
>> >> At any time, the dmac driver knows if the channel, on which the xfer is
>> >> prepared/submitted is Slave or not.
>> >>
>> >> SLAVE Transfer
>> >>    dmaxfer_template.src_inc  && !dmaxfer_template.dst_inc  => DMA_TO_DEVICE
>> >>    !dmaxfer_template.src_inc  && dmaxfer_template.dst_inc  => DMA_FROM_DEVICE
>> >>
>> >> Mem->Mem Transfer
>> >>    dmaxfer_template.src_inc  && !dmaxfer_template.dst_inc  => Meaningless
>> >>    !dmaxfer_template.src_inc  && dmaxfer_template.dst_inc  => MemSet
>> > Rather than each driver adding this logic with good chance of screwing
>> > up, care to add this as helper in dmaengine.h
>> >
>> > Ideally, I would have preferred direction to be told explicitly, would
>> > leave it you..
>> >
>> I repeat yet again :- "This api is common to Slave as well as Mem<->Mem"
>>
>> Even if we have slave clients specify DMA_TO/FROM_DEVICE, what
>> flag do you suggest Mem->Mem clients use ?
> Would it be invalid in that case!!!
Of course!
It doesn't make any sense for a mem->mem client asking
for DMA_FROM_DEVICE when it wanted MemSet.

> Same as few ields in xt_template would be for peripheral case..
No properly written client would ever pass 'invalid' values for
xt_template members.
But _every_ properly written Mem->Mem client would have to
ask for DMA_TO/FROM_DEVICE, following what you suggest.

Btw, even if we wanted, Memcpy couldn't be represented by
either DMA_TO_DEVICE or  DMA_FROM_DEVICE, because
both Src and Dst increments here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ