linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mm PATCH v2 00/26] Add support for DMA writable pages being writable by the network stack
@ 2016-11-02 11:12 Alexander Duyck
  2016-11-02 11:12 ` [mm PATCH v2 01/26] swiotlb: Drop unused functions swiotlb_map_sg and swiotlb_unmap_sg Alexander Duyck
                   ` (25 more replies)
  0 siblings, 26 replies; 34+ messages in thread
From: Alexander Duyck @ 2016-11-02 11:12 UTC (permalink / raw)
  To: linux-mm, akpm; +Cc: netdev, linux-kernel

The first 22 patches in the set add support for the DMA attribute
DMA_ATTR_SKIP_CPU_SYNC on multiple platforms/architectures.  This is needed
so that we can flag the calls to dma_map/unmap_page so that we do not
invalidate cache lines that do not currently belong to the device.  Instead
we have to take care of this in the driver via a call to
sync_single_range_for_cpu prior to freeing the Rx page.

Patch 23 adds support for dma_map_page_attrs and dma_unmap_page_attrs so
that we can unmap and map a page using the DMA_ATTR_SKIP_CPU_SYNC
attribute.

Patch 24 adds support for freeing a page that has multiple references being
held by a single caller.  This way we can free page fragments that were
allocated by a given driver.

The last 2 patches use these updates in the igb driver, and lay the
groundwork to allow for us to reimpelement the use of build_skb.

v1: Split out changes DMA_ERROR_CODE fix for swiotlb-xen
    Minor fixes based on issues found by kernel build bot
    Few minor changes for issues found on code review
    Added Acked-by for patches that were acked and not changed

v2: Added a few more Acked-by
    Added swiotlb_unmap_sg to functions dropped in patch 1, dropped Acked-by
    Submitting patches to mm instead of net-next

---

Alexander Duyck (26):
      swiotlb: Drop unused functions swiotlb_map_sg and swiotlb_unmap_sg
      swiotlb-xen: Enforce return of DMA_ERROR_CODE in mapping function
      swiotlb: Add support for DMA_ATTR_SKIP_CPU_SYNC
      arch/arc: Add option to skip sync on DMA mapping
      arch/arm: Add option to skip sync on DMA map and unmap
      arch/avr32: Add option to skip sync on DMA map
      arch/blackfin: Add option to skip sync on DMA map
      arch/c6x: Add option to skip sync on DMA map and unmap
      arch/frv: Add option to skip sync on DMA map
      arch/hexagon: Add option to skip DMA sync as a part of mapping
      arch/m68k: Add option to skip DMA sync as a part of mapping
      arch/metag: Add option to skip DMA sync as a part of map and unmap
      arch/microblaze: Add option to skip DMA sync as a part of map and unmap
      arch/mips: Add option to skip DMA sync as a part of map and unmap
      arch/nios2: Add option to skip DMA sync as a part of map and unmap
      arch/openrisc: Add option to skip DMA sync as a part of mapping
      arch/parisc: Add option to skip DMA sync as a part of map and unmap
      arch/powerpc: Add option to skip DMA sync as a part of mapping
      arch/sh: Add option to skip DMA sync as a part of mapping
      arch/sparc: Add option to skip DMA sync as a part of map and unmap
      arch/tile: Add option to skip DMA sync as a part of map and unmap
      arch/xtensa: Add option to skip DMA sync as a part of mapping
      dma: Add calls for dma_map_page_attrs and dma_unmap_page_attrs
      mm: Add support for releasing multiple instances of a page
      igb: Update driver to make use of DMA_ATTR_SKIP_CPU_SYNC
      igb: Update code to better handle incrementing page count


 arch/arc/mm/dma.c                         |    5 ++
 arch/arm/common/dmabounce.c               |   16 ++++--
 arch/arm/xen/mm.c                         |    1 
 arch/avr32/mm/dma-coherent.c              |    7 ++-
 arch/blackfin/kernel/dma-mapping.c        |    8 +++
 arch/c6x/kernel/dma.c                     |   14 ++++-
 arch/frv/mb93090-mb00/pci-dma-nommu.c     |   14 ++++-
 arch/frv/mb93090-mb00/pci-dma.c           |    9 +++
 arch/hexagon/kernel/dma.c                 |    6 ++
 arch/m68k/kernel/dma.c                    |    8 +++
 arch/metag/kernel/dma.c                   |   16 +++++-
 arch/microblaze/kernel/dma.c              |   10 +++-
 arch/mips/loongson64/common/dma-swiotlb.c |    2 -
 arch/mips/mm/dma-default.c                |    8 ++-
 arch/nios2/mm/dma-mapping.c               |   26 +++++++---
 arch/openrisc/kernel/dma.c                |    3 +
 arch/parisc/kernel/pci-dma.c              |   20 ++++++--
 arch/powerpc/kernel/dma.c                 |    9 +++
 arch/sh/kernel/dma-nommu.c                |    7 ++-
 arch/sparc/kernel/iommu.c                 |    4 +-
 arch/sparc/kernel/ioport.c                |    4 +-
 arch/tile/kernel/pci-dma.c                |   12 ++++-
 arch/x86/xen/pci-swiotlb-xen.c            |    1 
 arch/xtensa/kernel/pci-dma.c              |    7 ++-
 drivers/net/ethernet/intel/igb/igb.h      |    7 ++-
 drivers/net/ethernet/intel/igb/igb_main.c |   77 +++++++++++++++++++----------
 drivers/xen/swiotlb-xen.c                 |   27 +++++-----
 include/linux/dma-mapping.h               |   20 +++++---
 include/linux/gfp.h                       |    2 +
 include/linux/swiotlb.h                   |   14 ++---
 include/xen/swiotlb-xen.h                 |    3 -
 lib/swiotlb.c                             |   64 +++++++++++-------------
 mm/page_alloc.c                           |   14 +++++
 33 files changed, 291 insertions(+), 154 deletions(-)

--

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

end of thread, other threads:[~2016-11-05 23:13 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-02 11:12 [mm PATCH v2 00/26] Add support for DMA writable pages being writable by the network stack Alexander Duyck
2016-11-02 11:12 ` [mm PATCH v2 01/26] swiotlb: Drop unused functions swiotlb_map_sg and swiotlb_unmap_sg Alexander Duyck
2016-11-03 14:14   ` Christoph Hellwig
2016-11-03 14:29     ` Konrad Rzeszutek Wilk
2016-11-03 14:45       ` Christoph Hellwig
2016-11-03 15:02         ` Duyck, Alexander H
2016-11-02 11:12 ` [mm PATCH v2 02/26] swiotlb-xen: Enforce return of DMA_ERROR_CODE in mapping function Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 03/26] swiotlb: Add support for DMA_ATTR_SKIP_CPU_SYNC Alexander Duyck
2016-11-05 19:39   ` Konrad Rzeszutek Wilk
2016-11-05 23:13     ` Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 04/26] arch/arc: Add option to skip sync on DMA mapping Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 05/26] arch/arm: Add option to skip sync on DMA map and unmap Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 06/26] arch/avr32: Add option to skip sync on DMA map Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 07/26] arch/blackfin: " Alexander Duyck
2016-11-02 11:13 ` [mm PATCH v2 08/26] arch/c6x: Add option to skip sync on DMA map and unmap Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 09/26] arch/frv: Add option to skip sync on DMA map Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 10/26] arch/hexagon: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 11/26] arch/m68k: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 12/26] arch/metag: Add option to skip DMA sync as a part of map and unmap Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 13/26] arch/microblaze: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 14/26] arch/mips: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 15/26] arch/nios2: " Alexander Duyck
2016-11-02 11:14 ` [mm PATCH v2 16/26] arch/openrisc: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 17/26] arch/parisc: Add option to skip DMA sync as a part of map and unmap Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 18/26] arch/powerpc: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-04  3:16   ` Michael Ellerman
2016-11-02 11:15 ` [mm PATCH v2 19/26] arch/sh: " Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 20/26] arch/sparc: Add option to skip DMA sync as a part of map and unmap Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 21/26] arch/tile: " Alexander Duyck
2016-11-02 11:15 ` [mm PATCH v2 22/26] arch/xtensa: Add option to skip DMA sync as a part of mapping Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 23/26] dma: Add calls for dma_map_page_attrs and dma_unmap_page_attrs Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 24/26] mm: Add support for releasing multiple instances of a page Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 25/26] igb: Update driver to make use of DMA_ATTR_SKIP_CPU_SYNC Alexander Duyck
2016-11-02 11:16 ` [mm PATCH v2 26/26] igb: Update code to better handle incrementing page count Alexander Duyck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).