<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/base/dma-coherent.c, branch v4.7</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.7</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2016-03-22T22:36:02Z</updated>
<entry>
<title>drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings</title>
<updated>2016-03-22T22:36:02Z</updated>
<author>
<name>Brian Starkey</name>
<email>brian.starkey@arm.com</email>
</author>
<published>2016-03-22T21:28:06Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=20d7a35bc8be06dd1350de0454b0e24cca1d4354'/>
<id>urn:sha1:20d7a35bc8be06dd1350de0454b0e24cca1d4354</id>
<content type='text'>
Use memset_io() for DMA_MEMORY_IO mappings which are mapped as I/O
memory, and regular memset() for DMA_MEMORY_MAP mappings.

This fixes the below alignment fault on arm64 for DMA_MEMORY_IO
mappings, where memset() uses the DC ZVA instruction which is invalid on
device memory.

   Unhandled fault: alignment fault (0x96000061) at 0xffffff8000380000
   Internal error: : 96000061 [#1] PREEMPT SMP
   Modules linked in: hdlcd(+) clk_scpi
   CPU: 4 PID: 1355 Comm: systemd-udevd Not tainted 4.4.0-rc1+ #5
   Hardware name: ARM Juno development board (r0) (DT)
   task: ffffffc9763eee00 ti: ffffffc9758c4000 task.ti: ffffffc9758c4000
   PC is at __efistub_memset+0x1ac/0x200
   LR is at dma_alloc_from_coherent+0xb0/0x120
   pc : [&lt;ffffffc00030ff2c&gt;] lr : [&lt;ffffffc00042a918&gt;] pstate: 400001c5
   sp : ffffffc9758c79a0
   x29: ffffffc9758c79a0 x28: ffffffc000635cd0
   x27: 0000000000000124 x26: ffffffc000119ef4
   x25: 0000000000010000 x24: 0000000000000140
   x23: ffffffc07e9ac3a8 x22: ffffffc9758c7a58
   x21: ffffffc9758c7a68 x20: 0000000000000004
   x19: ffffffc07e9ac380 x18: 0000000000000001
   x17: 0000007fae1bbba8 x16: ffffffc0001b2d1c
   x15: ffffffffffffffff x14: 0ffffffffffffffe
   x13: 0000000000000010 x12: ffffff800837ffff
   x11: ffffff800837ffff x10: 0000000040000000
   x9 : 0000000000000000 x8 : ffffff8000380000
   x7 : 0000000000000000 x6 : 000000000000003f
   x5 : 0000000000000040 x4 : 0000000000000000
   x3 : 0000000000000004 x2 : 000000000000ffc0
   x1 : 0000000000000000 x0 : ffffff8000380000

Signed-off-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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>drivers: dma-coherent: use MEMREMAP_WC for DMA_MEMORY_MAP</title>
<updated>2016-03-22T22:36:02Z</updated>
<author>
<name>Brian Starkey</name>
<email>brian.starkey@arm.com</email>
</author>
<published>2016-03-22T21:28:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6b03ae0d42bfecf2536f7967d37e471d98c0b3d2'/>
<id>urn:sha1:6b03ae0d42bfecf2536f7967d37e471d98c0b3d2</id>
<content type='text'>
When the DMA_MEMORY_MAP flag is used, memory which can be accessed
directly should be returned, so use memremap(..., MEMREMAP_WC) to
provide a writecombine mapping.

Signed-off-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Reviewed-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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>drivers: dma-coherent: simplify dma_init_coherent_memory return value</title>
<updated>2016-02-10T01:39:33Z</updated>
<author>
<name>Michal Nazarewicz</name>
<email>mina86@mina86.com</email>
</author>
<published>2016-01-04T21:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9e5b3d6f7f946a3fb4d83ac2ab6d2bfefcdafffb'/>
<id>urn:sha1:9e5b3d6f7f946a3fb4d83ac2ab6d2bfefcdafffb</id>
<content type='text'>
Since only dma_declare_coherent_memory cares about
dma_init_coherent_memory returning part of flags as it return value,
move the condition to the former and simplify the latter.  This in
turn makes rmem_dma_device_init less confusing.

Reported-by: Fugang Duan &lt;B38611@freescale.com&gt;
Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: dma-coherent: add initialization from device tree</title>
<updated>2014-10-14T00:18:12Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2014-10-13T22:51:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7bfa5ab6fa1b18f53fb94f922e107e6fbdc5e485'/>
<id>urn:sha1:7bfa5ab6fa1b18f53fb94f922e107e6fbdc5e485</id>
<content type='text'>
Initialization procedure of dma coherent pool has been split into two
parts, so memory pool can now be initialized without assigning to
particular struct device.  Then initialized region can be assigned to more
than one struct device.  To protect from concurent allocations from
structure.  The last part of this patch adds support for handling
'shared-dma-pool' reserved-memory device tree nodes.

[akpm@linux-foundation.org: use more appropriate printk facility levels]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Laura Abbott &lt;lauraa@codeaurora.org&gt;
Cc: Josh Cartwright &lt;joshc@codeaurora.org&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.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>DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t</title>
<updated>2014-05-20T22:55:23Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-05-20T22:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=88a984ba0795f14a3847edbd7fabe652289ea89b'/>
<id>urn:sha1:88a984ba0795f14a3847edbd7fabe652289ea89b</id>
<content type='text'>
dma_declare_coherent_memory() takes two addresses for a region of memory: a
"bus_addr" and a "device_addr".  I think the intent is that "bus_addr" is
the physical address a *CPU* would use to access the region, and
"device_addr" is the bus address the *device* would use to address the
region.

Rename "bus_addr" to "phys_addr" and change its type to phys_addr_t.
Most callers already supply a phys_addr_t for this argument.  The others
supply a 32-bit integer (a constant, unsigned int, or __u32) and need no
change.

Use "unsigned long", not phys_addr_t, to hold PFNs.

No functional change (this could theoretically fix a truncation in a config
with 32-bit dma_addr_t and 64-bit phys_addr_t, but I don't think there are
any such cases involving this code).

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: James Bottomley &lt;jbottomley@Parallels.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;</content>
</entry>
<entry>
<title>drivers: dma-coherent: Fix typo in dma_mmap_from_coherent documentation</title>
<updated>2012-10-23T12:05:32Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2012-10-18T07:29:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ba4d93bc9ea4510a145161f0af3537b4f380af01'/>
<id>urn:sha1:ba4d93bc9ea4510a145161f0af3537b4f380af01</id>
<content type='text'>
The function documentation incorrectly references dma_release_coherent.
Fix it. Don't mention a specific function name as dma_mmap_from_coherent
as multiple callers.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
</content>
</entry>
<entry>
<title>driver core: fix some kernel-doc warnings in dma*.c</title>
<updated>2012-06-15T00:15:26Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2012-06-09T22:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6e7b4a59b3d7bb2dcd11c019354bf0c91037dadd'/>
<id>urn:sha1:6e7b4a59b3d7bb2dcd11c019354bf0c91037dadd</id>
<content type='text'>
Fix kernel-doc warnings in drivers/base/dma*.c:

Warning(drivers/base/dma-buf.c:498): No description found for parameter 'vaddr'
Warning(drivers/base/dma-coherent.c:199): No description found for parameter 'ret'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>common: add dma_mmap_from_coherent() function</title>
<updated>2012-05-21T13:06:09Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2012-03-23T12:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=bca0fa5f12a6744a2b2e53154af65a51402b3426'/>
<id>urn:sha1:bca0fa5f12a6744a2b2e53154af65a51402b3426</id>
<content type='text'>
Add a common helper for dma-mapping core for mapping a coherent buffer
to userspace.

Reported-by: Subash Patel &lt;subashrp@gmail.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Tested-By: Subash Patel &lt;subash.ramaswamy@linaro.org&gt;
</content>
</entry>
<entry>
<title>drivers/base: dma-coherent.c is a module and needs module.h</title>
<updated>2011-10-31T23:31:38Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-07-01T20:07:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=08a999ce69c17802d92ad760faa21ce112968172'/>
<id>urn:sha1:08a999ce69c17802d92ad760faa21ce112968172</id>
<content type='text'>
It was implicitly getting it before, but it will break compiles
once we fix that.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>Driver core: internal struct dma_coherent_mem, change type of a member.</title>
<updated>2010-08-05T20:53:33Z</updated>
<author>
<name>Marin Mitov</name>
<email>mitov@issp.bas.bg</email>
</author>
<published>2010-05-31T10:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ed1d218c95c6846416ddb39085b20a5b3c0872e4'/>
<id>urn:sha1:ed1d218c95c6846416ddb39085b20a5b3c0872e4</id>
<content type='text'>
struct dma_coherent_mem in drivers/base/dma-coherent.c
has member 'device_base' that is of type u32,
but is assigned value of type dma_addr_t, which may be
64 bits for x86_64. Change the type to dma_addr_t.

Signed-off-by: Marin Mitov &lt;mitov@issp.bas.bg&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
