<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/dma-contiguous.c, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-11-05T05:50:37Z</updated>
<entry>
<title>Merge tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2015-11-05T05:50:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-11-05T05:50:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e880e87488d5bbf630dd716e6de8a53585614568'/>
<id>urn:sha1:e880e87488d5bbf630dd716e6de8a53585614568</id>
<content type='text'>
Pull driver core updates from Greg KH:
 "Here's the "big" driver core updates for 4.4-rc1.  Primarily a bunch
  of debugfs updates, with a smattering of minor driver core fixes and
  updates as well.

  All have been in linux-next for a long time"

* tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  debugfs: Add debugfs_create_ulong()
  of: to support binding numa node to specified device in devicetree
  debugfs: Add read-only/write-only bool file ops
  debugfs: Add read-only/write-only size_t file ops
  debugfs: Add read-only/write-only x64 file ops
  debugfs: Consolidate file mode checks in debugfs_create_*()
  Revert "mm: Check if section present during memory block (un)registering"
  driver-core: platform: Provide helpers for multi-driver modules
  mm: Check if section present during memory block (un)registering
  devres: fix a for loop bounds check
  CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit
  base/platform: assert that dev_pm_domain callbacks are called unconditionally
  sysfs: correctly handle short reads on PREALLOC attrs.
  base: soc: siplify ida usage
  kobject: move EXPORT_SYMBOL() macros next to corresponding definitions
  kobject: explain what kobject's sd field is
  debugfs: document that debugfs_remove*() accepts NULL and error values
  debugfs: Pass bool pointer to debugfs_create_bool()
  ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'
</content>
</entry>
<entry>
<title>mm: cma: fix incorrect type conversion for size during dma allocation</title>
<updated>2015-10-23T08:55:10Z</updated>
<author>
<name>Rohit Vaswani</name>
<email>rvaswani@codeaurora.org</email>
</author>
<published>2015-10-22T20:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67a2e213e7e937c41c52ab5bc46bf3f4de469f6e'/>
<id>urn:sha1:67a2e213e7e937c41c52ab5bc46bf3f4de469f6e</id>
<content type='text'>
This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.

  show_stack+0x10/0x1c
  dump_stack+0x74/0xc8
  kasan_report_error+0x2b0/0x408
  kasan_report+0x34/0x40
  __asan_storeN+0x15c/0x168
  memset+0x20/0x44
  __dma_alloc_coherent+0x114/0x18c

Signed-off-by: Rohit Vaswani &lt;rvaswani@codeaurora.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Marek Szyprowski &lt;m.szyprowski@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>CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit</title>
<updated>2015-10-05T03:49:54Z</updated>
<author>
<name>Tan Xiaojun</name>
<email>tanxiaojun@huawei.com</email>
</author>
<published>2015-09-24T03:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a785ce9c90bc7d73b5cae4388641b310948509cb'/>
<id>urn:sha1:a785ce9c90bc7d73b5cae4388641b310948509cb</id>
<content type='text'>
In 64bit system, if you set CONFIG_CMA_SIZE_MBYTES&gt;=2048, it will
overflow and size_bytes will be a big wrong number.

Set CONFIG_CMA_SIZE_MBYTES=2048 and you will get an info below
during system boot:

*********
cma: Failed to reserve 17592186042368 MiB
*********

Signed-off-by: Tan Xiaojun &lt;tanxiaojun@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: of: add return value to of_reserved_mem_device_init()</title>
<updated>2014-10-29T23:33:14Z</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2014-10-29T21:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47f29df7db78ee4fcdb104cf36918d987ddd0278'/>
<id>urn:sha1:47f29df7db78ee4fcdb104cf36918d987ddd0278</id>
<content type='text'>
Driver calling of_reserved_mem_device_init() might be interested if the
initialization has been successful or not, so add support for returning
error code.

This fixes a build warining caused by commit 7bfa5ab6fa1b ("drivers:
dma-coherent: add initialization from device tree"), which has been
merged without this change and without fixing function return value.

Fixes: 7bfa5ab6fa1b1 ("drivers: dma-coherent: add initialization from device tree")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: 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;
Cc: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&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-contiguous: 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:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de9e14eebf33a60712a52a0bc6e08c043c0aba53'/>
<id>urn:sha1:de9e14eebf33a60712a52a0bc6e08c043c0aba53</id>
<content type='text'>
Add a function to create CMA region from previously reserved memory and
add support for handling 'shared-dma-pool' reserved-memory device tree
nodes.

Based on previous code provided by Josh Cartwright &lt;joshc@codeaurora.org&gt;

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>mm, CMA: change cma_declare_contiguous() to obey coding convention</title>
<updated>2014-08-07T01:01:16Z</updated>
<author>
<name>Joonsoo Kim</name>
<email>iamjoonsoo.kim@lge.com</email>
</author>
<published>2014-08-06T23:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c1f733aaaf30a0068a3126d5aa9d5b4c25ba4c0c'/>
<id>urn:sha1:c1f733aaaf30a0068a3126d5aa9d5b4c25ba4c0c</id>
<content type='text'>
Conventionally, we put output param to the end of param list and put the
'base' ahead of 'size', but cma_declare_contiguous() doesn't look like
that, so change it.

Additionally, move down cma_areas reference code to the position where
it is really needed.

Signed-off-by: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Acked-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Reviewed-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexander Graf &lt;agraf@suse.de&gt;
Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.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>CMA: generalize CMA reserved area management functionality</title>
<updated>2014-08-07T01:01:16Z</updated>
<author>
<name>Joonsoo Kim</name>
<email>iamjoonsoo.kim@lge.com</email>
</author>
<published>2014-08-06T23:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a254129e8686bff7a340b58f35241b04927e81c0'/>
<id>urn:sha1:a254129e8686bff7a340b58f35241b04927e81c0</id>
<content type='text'>
Currently, there are two users on CMA functionality, one is the DMA
subsystem and the other is the KVM on powerpc.  They have their own code
to manage CMA reserved area even if they looks really similar.  From my
guess, it is caused by some needs on bitmap management.  KVM side wants
to maintain bitmap not for 1 page, but for more size.  Eventually it use
bitmap where one bit represents 64 pages.

When I implement CMA related patches, I should change those two places
to apply my change and it seem to be painful to me.  I want to change
this situation and reduce future code management overhead through this
patch.

This change could also help developer who want to use CMA in their new
feature development, since they can use CMA easily without copying &amp;
pasting this reserved area management code.

In previous patches, we have prepared some features to generalize CMA
reserved area management and now it's time to do it.  This patch moves
core functions to mm/cma.c and change DMA APIs to use these functions.

There is no functional change in DMA APIs.

Signed-off-by: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Acked-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Acked-by: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Reviewed-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexander Graf &lt;agraf@suse.de&gt;
Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.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>DMA, CMA: support arbitrary bitmap granularity</title>
<updated>2014-08-07T01:01:16Z</updated>
<author>
<name>Joonsoo Kim</name>
<email>iamjoonsoo.kim@lge.com</email>
</author>
<published>2014-08-06T23:05:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0bdb37d95dd44086159607e571fd70f6b62dc2d'/>
<id>urn:sha1:e0bdb37d95dd44086159607e571fd70f6b62dc2d</id>
<content type='text'>
PPC KVM's CMA area management requires arbitrary bitmap granularity,
since they want to reserve very large memory and manage this region with
bitmap that one bit for several pages to reduce management overheads.
So support arbitrary bitmap granularity for following generalization.

[akpm@linux-foundation.org: s/1/1UL/]
Signed-off-by: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Acked-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Acked-by: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Reviewed-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexander Graf &lt;agraf@suse.de&gt;
Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.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>DMA, CMA: support alignment constraint on CMA region</title>
<updated>2014-08-07T01:01:16Z</updated>
<author>
<name>Joonsoo Kim</name>
<email>iamjoonsoo.kim@lge.com</email>
</author>
<published>2014-08-06T23:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a15bc0b89e8812d0db297bc771a85812c4fa83c1'/>
<id>urn:sha1:a15bc0b89e8812d0db297bc771a85812c4fa83c1</id>
<content type='text'>
PPC KVM's CMA area management needs alignment constraint on CMA region.
So support it to prepare generalization of CMA area management
functionality.

Additionally, add some comments which tell us why alignment constraint
is needed on CMA region.

Signed-off-by: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Acked-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Reviewed-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexander Graf &lt;agraf@suse.de&gt;
Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.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>DMA, CMA: separate core CMA management codes from DMA APIs</title>
<updated>2014-08-07T01:01:16Z</updated>
<author>
<name>Joonsoo Kim</name>
<email>iamjoonsoo.kim@lge.com</email>
</author>
<published>2014-08-06T23:05:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3162bbd7e65b9cc57b660796dd3409807bfc9070'/>
<id>urn:sha1:3162bbd7e65b9cc57b660796dd3409807bfc9070</id>
<content type='text'>
To prepare future generalization work on CMA area management code, we
need to separate core CMA management codes from DMA APIs.  We will
extend these core functions to cover requirements of PPC KVM's CMA area
management functionality in following patches.  This separation helps us
not to touch DMA APIs while extending core functions.

Signed-off-by: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Acked-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Reviewed-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexander Graf &lt;agraf@suse.de&gt;
Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Gleb Natapov &lt;gleb@kernel.org&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@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>
</feed>
