All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] enhance DMA CMA on x86
@ 2014-01-14 14:13 ` Akinobu Mita
  0 siblings, 0 replies; 36+ messages in thread
From: Akinobu Mita @ 2014-01-14 14:13 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
  Cc: Andi Kleen, x86-DgEjT+Ai2ygdnm+yROfE0A, Akinobu Mita,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar,
	H. Peter Anvin, Thomas Gleixner, David Woodhouse

This patch set enhances the DMA Contiguous Memory Allocator on x86.

Currently the DMA CMA is only supported with pci-nommu dma_map_ops
and furthermore it can't be enabled on x86_64.  But I would like to
allocate big contiguous memory with dma_alloc_coherent() and tell it
to the device that requires it, regardless of which dma mapping
implementation is actually used in the system.

So this makes it work with swiotlb and intel-iommu dma_map_ops, too.
And this also extends "cma=" kernel parameter to specify placement
constraint by the physical address range of memory allocations.  For
example, CMA allocates memory below 4GB by "cma=64M@0-4G", it is
required for the devices only supporting 32-bit addressing on 64-bit
systems without iommu.

* Changes from v1
- fix dma_alloc_coherent() with __GFP_ZERO
- add placement specifier for "cma=" kernel parameter

Akinobu Mita (5):
  x86: make dma_alloc_coherent() return zeroed memory if CMA is enabled
  x86: enable DMA CMA with swiotlb
  intel-iommu: integrate DMA CMA
  memblock: introduce memblock_alloc_range()
  cma: add placement specifier for "cma=" kernel parameter

 Documentation/kernel-parameters.txt |  7 +++++--
 arch/x86/Kconfig                    |  2 +-
 arch/x86/include/asm/swiotlb.h      |  7 +++++++
 arch/x86/kernel/amd_gart_64.c       |  2 +-
 arch/x86/kernel/pci-dma.c           |  3 +--
 arch/x86/kernel/pci-swiotlb.c       |  9 +++++---
 arch/x86/pci/sta2x11-fixup.c        |  6 ++----
 drivers/base/dma-contiguous.c       | 42 ++++++++++++++++++++++++++++---------
 drivers/iommu/intel-iommu.c         | 32 +++++++++++++++++++++-------
 include/linux/dma-contiguous.h      |  9 +++++---
 include/linux/memblock.h            |  2 ++
 include/linux/swiotlb.h             |  2 ++
 lib/swiotlb.c                       |  2 +-
 mm/memblock.c                       | 27 +++++++++++++++++-------
 14 files changed, 110 insertions(+), 42 deletions(-)

Cc: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Don Dutile <ddutile-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2014-02-03 12:14 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 14:13 [PATCH v2 0/5] enhance DMA CMA on x86 Akinobu Mita
2014-01-14 14:13 ` Akinobu Mita
     [not found] ` <1389708830-5841-1-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-14 14:13   ` [PATCH v2 1/5] x86: make dma_alloc_coherent() return zeroed memory if CMA is enabled Akinobu Mita
2014-01-14 14:13     ` Akinobu Mita
     [not found]     ` <1389708830-5841-2-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-15 20:09       ` Konrad Rzeszutek Wilk
2014-01-15 20:09         ` Konrad Rzeszutek Wilk
     [not found]         ` <20140115200934.GC5201-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2014-01-16 23:34           ` Akinobu Mita
2014-01-16 23:34             ` Akinobu Mita
     [not found]             ` <CAC5umygcr0a_BfDJ9tB1EDry4UEwThG7WvkA8Dn27zO9RQab8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-24 18:07               ` Konrad Rzeszutek Wilk
2014-01-24 18:07                 ` Konrad Rzeszutek Wilk
2014-01-27 13:54       ` Marek Szyprowski
2014-01-27 13:54         ` Marek Szyprowski
     [not found]         ` <52E66527.8010000-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-01-27 15:23           ` Konrad Rzeszutek Wilk
2014-01-27 15:23             ` Konrad Rzeszutek Wilk
     [not found]             ` <20140127152342.GC20968-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2014-01-28 23:20               ` Akinobu Mita
2014-01-28 23:20                 ` Akinobu Mita
     [not found]                 ` <CAC5umyjJfO9UyAkoG-bEX-vdO+X0fM_YD2dwj2AHT6T7hKgv0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-03 12:14                   ` Akinobu Mita
2014-02-03 12:14                     ` Akinobu Mita
2014-01-14 14:13   ` [PATCH v2 2/5] x86: enable DMA CMA with swiotlb Akinobu Mita
2014-01-14 14:13     ` Akinobu Mita
     [not found]     ` <1389708830-5841-3-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-15 20:12       ` Konrad Rzeszutek Wilk
2014-01-15 20:12         ` Konrad Rzeszutek Wilk
     [not found]         ` <20140115201224.GD5201-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2014-01-16 23:32           ` Akinobu Mita
2014-01-16 23:32             ` Akinobu Mita
     [not found]             ` <CAC5umyitWHvWiWn9B3wtTNBhbO7Rz_ghqmxhwu9caq40msnfAA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-24 18:06               ` Konrad Rzeszutek Wilk
2014-01-24 18:06                 ` Konrad Rzeszutek Wilk
2014-01-14 14:13   ` [PATCH v2 3/5] intel-iommu: integrate DMA CMA Akinobu Mita
2014-01-14 14:13     ` Akinobu Mita
     [not found]     ` <1389708830-5841-4-git-send-email-akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-16 14:28       ` Marek Szyprowski
2014-01-16 14:28         ` Marek Szyprowski
     [not found]         ` <52D7EC74.7030401-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-01-16 23:28           ` Akinobu Mita
2014-01-16 23:28             ` Akinobu Mita
2014-01-14 14:13   ` [PATCH v2 4/5] memblock: introduce memblock_alloc_range() Akinobu Mita
2014-01-14 14:13     ` Akinobu Mita
2014-01-14 14:13   ` [PATCH v2 5/5] cma: add placement specifier for "cma=" kernel parameter Akinobu Mita
2014-01-14 14:13     ` Akinobu Mita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.