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, 11 Jul 2007 09:43:39 -0700
From:	"Dan Williams" <dan.j.williams@...il.com>
To:	"Peter Pearse" <peter.pearse@....com>
Cc:	linux-kernel@...r.kernel.org, shannon.nelson@...el.com
Subject: Re: [RFC][PATCH] DMA: Expand dmaengine implementation for more DMACs

On 7/3/07, Peter Pearse <peter.pearse@....com> wrote:
> Hi,
>
> The existing DMAC used by the dmaengine API (Intel IOAT) assumes all
> possible clients can use any available DMA channel.
>
> Some other DMACs restrict particular peripherals to particular DMA channels.
>
> The patch below (against v2.6.22-rc7) extends the dmaengine implementation
> to allow such DMACs to differentiate between clients.
>
Hi Peter,

Have a look at:
http://marc.info/?l=linux-raid&m=118290909528910&w=2
http://marc.info/?l=linux-raid&m=118290909523734&w=2

It seems your requirement could be satisfied by a natural extension of
the 'dma_cap_mask' implementation.  'dma_cap_mask' allows clients to
only be notified of channels that meet a certain capability profile.

However since your driver is pretty much guaranteed to be the only
dmaengine driver in the system you can safely do something like the
following in your client callback:

static enum dma_state_client
my_dma_client_callback(struct dma_client *client,
			struct dma_chan *chan, enum dma_state state)
{
	struct dma_device *dma_dev;
	struct my_platform_specific_dma *plat_dma_dev;
	
	dma_dev = chan->device;
	plat_dma_dev = container_of(dma_dev, struct my_platform_specific_dma, dma_dev);

	if (!plat_dma_dev->platform_specific_capability)
		return DMA_DUP;

	. . .
}

> Regards
>
> Peter Pearse
>

--
Dan
-
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