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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080207185646.024ed294@dhcp-252-066.norway.atmel.com>
Date:	Thu, 7 Feb 2008 18:56:46 +0100
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	"Dan Williams" <dan.j.williams@...el.com>
Cc:	"David Brownell" <david-b@...bell.net>,
	linux-kernel@...r.kernel.org,
	"Shannon Nelson" <shannon.nelson@...el.com>, kernel@...32linux.org,
	"Francis Moreau" <francis.moro@...il.com>,
	"Paul Mundt" <lethal@...ux-sh.org>,
	"Vladimir A. Barinov" <vbarinov@...mvista.com>,
	"Pierre Ossman" <drzeus-list@...eus.cx>
Subject: Re: [RFC v2 2/5] dmaengine: Add slave DMA interface

On Wed, 6 Feb 2008 14:08:35 -0700
"Dan Williams" <dan.j.williams@...el.com> wrote:

> On Jan 30, 2008 5:26 AM, Haavard Skinnemoen <hskinnemoen@...el.com> wrote:
> [..]
> > Right. I'll add a "unsigned int engine_type" field so that engine
> > drivers can go ahead and extend the standard dma_device structure.
> > Maybe we should add a "void *platform_data" field to the dma_slave
> > struct as well so that platforms can pass arbitrary platform-specific
> > information to the DMA controller driver?
> >  
> 
> I think we can get away with not adding an engine_type field:
> 1/ For a given platform there will usually only be one driver active.
> For example I have an architecture (IOP) specific dma_copy_to_user
> implementation that can safely assume it is talking to the iop-adma
> driver since ioat_dma and others are precluded by the Kconfig.
> 2/ If there was a situation where two dma drivers were active in a
> system you could tell them apart by comparing the function pointers,
> i.e. dma_device1->device_prep_dma_memcpy !=
> dma_device2->device_prep_dma_memcpy.

What would you be comparing them against? Perhaps you could pass a
struct device * from the platform code, which can be compared against
"dev" in struct dma_device? Or you could check dma_device->dev->name
perhaps.

In any case, I agree we probably don't need the engine_type field.

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