<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/include/asm-avr32/dma-mapping.h, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/include/asm-avr32/dma-mapping.h?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/include/asm-avr32/dma-mapping.h?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2008-08-05T11:35:07Z</updated>
<entry>
<title>avr32: Move include/asm-avr32 to arch/avr32/include/asm</title>
<updated>2008-08-05T11:35:07Z</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>haavard.skinnemoen@atmel.com</email>
</author>
<published>2008-08-05T11:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=84db8d7cdb072866f5a6c6ac2c9a74c5c48dd22f'/>
<id>urn:sha1:84db8d7cdb072866f5a6c6ac2c9a74c5c48dd22f</id>
<content type='text'>
Leaving include/asm/arch alone for now.

Signed-off-by: Haavard Skinnemoen &lt;haavard.skinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: add the device argument to dma_mapping_error()</title>
<updated>2008-07-26T19:00:03Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-07-26T02:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06'/>
<id>urn:sha1:8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06</id>
<content type='text'>
Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
architecture does:

This enables us to cleanly fix the Calgary IOMMU issue that some devices
are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

I think that per-device dma_mapping_ops support would be also helpful for
KVM people to support PCI passthrough but Andi thinks that this makes it
difficult to support the PCI passthrough (see the above thread).  So I
CC'ed this to KVM camp.  Comments are appreciated.

A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
NULL, the system-wide dma_ops pointer is used as before.

If it's useful for KVM people, I plan to implement a mechanism to register
a hook called when a new pci (or dma capable) device is created (it works
with hot plugging).  It enables IOMMUs to set up an appropriate
dma_mapping_ops per device.

The major obstacle is that dma_mapping_error doesn't take a pointer to the
device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
device.  Note all the POWER IOMMUs use the same dma_mapping_error function
so this is not a problem for POWER but x86 IOMMUs use different
dma_mapping_error functions.

The first patch adds the device argument to dma_mapping_error.  The patch
is trivial but large since it touches lots of drivers and dma-mapping.h in
all the architecture.

This patch:

dma_mapping_error() doesn't take a pointer to the device unlike other DMA
operations.  So we can't have dma_mapping_ops per device.

Note that POWER already has dma_mapping_ops per device but all the POWER
IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
argument.

[akpm@linux-foundation.org: fix sge]
[akpm@linux-foundation.org: fix svc_rdma]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix bnx2x]
[akpm@linux-foundation.org: fix s2io]
[akpm@linux-foundation.org: fix pasemi_mac]
[akpm@linux-foundation.org: fix sdhci]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix sparc]
[akpm@linux-foundation.org: fix ibmvscsi]
Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Muli Ben-Yehuda &lt;muli@il.ibm.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Avi Kivity &lt;avi@qumranet.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>AVR32: Fix sg_page breakage</title>
<updated>2007-10-24T08:16:02Z</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2007-10-24T08:16:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=18ccc4194389c6edc78ede76ada3bf753525b11c'/>
<id>urn:sha1:18ccc4194389c6edc78ede76ada3bf753525b11c</id>
<content type='text'>
The latest sg changes introduce the following build errors on AVR32:

include/asm/dma-mapping.h: In function ‘dma_map_sg’:
include/asm/dma-mapping.h:220: error: implicit declaration of function ‘sg_page’
include/asm/dma-mapping.h:220: error: invalid operands to binary -
include/asm/dma-mapping.h:221: error: implicit declaration of function ‘sg_virt’
include/asm/dma-mapping.h:221: warning: assignment makes pointer from integer without a cast
include/asm/dma-mapping.h: In function ‘dma_sync_sg_for_device’:
include/asm/dma-mapping.h:330: warning: passing argument 2 of ‘dma_cache_sync’ makes pointer from integer without a cast

Fix it by including the correct header file, i.e. linux/scatterlist.h
instead of asm/scatterlist.h.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>fvr32: fixup dma-mapping for new sg layout</title>
<updated>2007-10-23T10:54:14Z</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2007-10-23T10:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=83fcaf70403ce04c693b52e62c794834b9a86089'/>
<id>urn:sha1:83fcaf70403ce04c693b52e62c794834b9a86089</id>
<content type='text'>
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>[AVR32] Make dma_sync_*_for_cpu no-ops</title>
<updated>2007-10-11T10:16:57Z</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2007-09-07T15:00:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b5a8e7362a0a5088ac080086d41cd98a54e0791b'/>
<id>urn:sha1:b5a8e7362a0a5088ac080086d41cd98a54e0791b</id>
<content type='text'>
I don't think the dma_sync_*_for_cpu ever did anything useful. We
flush the relevant cache lines when mapping the buffer or when calling
dma_sync_*_for_device(), and the CPU isn't allowed to touch the buffer
after that.

In other words, if these functions actually have anything to flush
from the caches, we're already in trouble.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>avr32: dma-mapping.h</title>
<updated>2007-03-07T09:50:30Z</updated>
<author>
<name>Gary Zambrano</name>
<email>zambrano@broadcom.com</email>
</author>
<published>2007-03-03T00:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a9e28d9b0b269a68a19e4ff0f6b9473f86b01358'/>
<id>urn:sha1:a9e28d9b0b269a68a19e4ff0f6b9473f86b01358</id>
<content type='text'>
Added dma_sync_single_range_for_cpu/device to dma-mapping.h in asm-avr32 to
call dma_sync_single_for_cpu/device.  This patch enables b44 to compile on
systems with these cpus.  This patch was created with the assumption that
another method of dma_sync_single_range_for_cpu/device does not exist on these
architectures.

Signed-off by: Gary Zambrano &lt;zambrano@broadcom.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>[AVR32] Implement dma_mapping_error()</title>
<updated>2007-02-09T14:01:57Z</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2007-02-01T15:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6eb484fe92e2f67f888dc87e97bfd938c0f7404e'/>
<id>urn:sha1:6eb484fe92e2f67f888dc87e97bfd938c0f7404e</id>
<content type='text'>
dma_map_single() never fails, so dma_mapping_error() simply returns 0.

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>[AVR32] Pass dev parameter to dma_cache_sync()</title>
<updated>2006-12-08T12:08:22Z</updated>
<author>
<name>Haavard Skinnemoen</name>
<email>hskinnemoen@atmel.com</email>
</author>
<published>2006-12-08T11:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=50954ab327a9f860caef1a7c8353346b945cb316'/>
<id>urn:sha1:50954ab327a9f860caef1a7c8353346b945cb316</id>
<content type='text'>
Fix build breakage resulting from the extra dev parameter added to
dma_cache_sync().

Signed-off-by: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] Pass struct dev pointer to dma_cache_sync()</title>
<updated>2006-12-07T16:39:41Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2006-12-07T04:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d3fa72e4556ec1f04e46a0d561d9e785ecaa173d'/>
<id>urn:sha1:d3fa72e4556ec1f04e46a0d561d9e785ecaa173d</id>
<content type='text'>
Pass struct dev pointer to dma_cache_sync()

dma_cache_sync() is ill-designed in that it does not have a struct device
pointer argument which makes proper support for systems that consist of a
mix of coherent and non-coherent DMA devices hard.  Change dma_cache_sync
to take a struct device pointer as first argument and fix all its callers
to pass it.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: James Bottomley &lt;James.Bottomley@steeleye.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Add struct dev pointer to dma_is_consistent()</title>
<updated>2006-12-07T16:39:41Z</updated>
<author>
<name>Ralf Baechle</name>
<email>ralf@linux-mips.org</email>
</author>
<published>2006-12-07T04:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f67637ee4b5d90d41160d755b9a8cca18c394586'/>
<id>urn:sha1:f67637ee4b5d90d41160d755b9a8cca18c394586</id>
<content type='text'>
dma_is_consistent() is ill-designed in that it does not have a struct
device pointer argument which makes proper support for systems that consist
of a mix of coherent and non-coherent DMA devices hard.  Change
dma_is_consistent to take a struct device pointer as first argument and fix
the sole caller to pass it.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: James Bottomley &lt;James.Bottomley@steeleye.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
