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, 01 Jul 2009 15:58:40 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	dan.j.williams@...el.com, maciej.sosnowski@...el.com
CC:	Nicolas Ferre <nicolas.ferre@...el.com>, avictor.za@...il.com,
	linux-arm-kernel@...ts.arm.linux.org.uk, patrice.vilchez@...el.com,
	linux-kernel@...r.kernel.org, Atsushi Nemoto <anemo@....ocn.ne.jp>
Subject: Re: [PATCH 1/2 v2] dmaengine: at_hdmac: new driver for the Atmel
 AHB DMA Controller

Hi,

Just one question Dan (see below).

Nicolas Ferre :
> This AHB DMA Controller (aka HDMA or DMAC on AT91 systems) is availlable on
> at91sam9rl chip. It will be used on other products in the future.

[..]

> +/**
> + * atc_chain_complete - finish work for one transaction chain
> + * @atchan: channel we work on
> + * @desc: descriptor at the head of the chain we want do complete
> + *
> + * Called with atchan->lock held and bh disabled */
> +static void
> +atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc)
> +{
> +	dma_async_tx_callback		callback;
> +	void				*param;
> +	struct dma_async_tx_descriptor	*txd = &desc->txd;
> +
> +	dev_vdbg(chan2dev(&atchan->chan_common),
> +		"descriptor %u complete\n", txd->cookie);
> +
> +	atchan->completed_cookie = txd->cookie;
> +	callback = txd->callback;
> +	param = txd->callback_param;
> +
> +	/* move children to free_list */
> +	list_splice_init(&txd->tx_list, &atchan->free_list);
> +	/* move myself to free_list */
> +	list_move(&desc->desc_node, &atchan->free_list);
> +
> +	/*
> +	 * We use dma_unmap_page() regardless of how the buffers were
> +	 * mapped before they were submitted...
> +	 */
> +	if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP))
> +		dma_unmap_page(chan2parent(&atchan->chan_common), desc->lli.daddr,
> +				desc->len, DMA_FROM_DEVICE);
> +	if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP))
> +		dma_unmap_page(chan2parent(&atchan->chan_common), desc->lli.saddr,
> +				desc->len, DMA_TO_DEVICE);
> +
> +	/*
> +	 * The API requires that no submissions are done from a
> +	 * callback, so we don't need to drop the lock here
> +	 */
> +	if (callback)
> +		callback(param);

Even if our dma controller does not seems to take advantage of
dependency requests...

...should I add the
dma_run_dependencies(txd);
call here to improve conformance to dmaengine standards ?

As you advice Atsushi Nemoto to do so, I was wondering if I have to do
the same.

Thanks for your help.
-- 
Nicolas Ferre

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