Skip to content

Change vring space from nomal memory to dma coherent memory

Sherry Sun linux-pci lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 11 repliesIn review
  2. v42 patches 2 repliesSuperseded
  3. v34 patches 20 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches15 repliesSuperseded
v15 patches16 repliesSuperseded

Changes in v5 from the cover letter

1. Reorganize the vop_mmap function code in patch 1, which is done by Christoph.
2. Completely remove the unnecessary code related to reassign the used ring for card in patch 2.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2misc: vop: change the way of allocating vrings and device pagedrivers/misc/mic/bus/vop_bus.h drivers/misc/mic/host/mic_boot.c drivers/misc/mic/host/mic_main.c +1 more+77 -1120 replies
2/2misc: vop: do not allocate and reassign the used ringdrivers/misc/mic/vop/vop_debugfs.c drivers/misc/mic/vop/vop_main.c drivers/misc/mic/vop/vop_vringh.c +1 more+8 -1060 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH V5 0/2] Change vring space from nomal memory to dma coherent memory

Changes in V5:
1. Reorganize the vop_mmap function code in patch 1, which is done by Christoph.
2. Completely remove the unnecessary code related to reassign the used ring for card in patch 2.

The original vop driver only supports dma coherent device, as it allocates and maps vring by _get_free_pages and dma_map_single, but not use dma_sync_single_for_cpu/device to sync the updates of device_page/vring between EP and RC, which will cause memory synchronization problem for device don't support hardware dma coherent.

And allocate vrings use dma_alloc_coherent is a common way in kernel, as the memory interacted between two systems should use consistent memory to avoid caching effects. So here add noncoherent platform support for vop driver. Also add some related dma changes to make sure noncoherent platform works well.

Sherry Sun (2):
misc: vop: change the way of allocating vrings and device page
misc: vop: do not allocate and reassign the used ring

 drivers/misc/mic/bus/vop_bus.h     |   2 +
 drivers/misc/mic/host/mic_boot.c   |   9 ++
 drivers/misc/mic/host/mic_main.c   |  43 ++------
 drivers/misc/mic/vop/vop_debugfs.c |   4 -
 drivers/misc/mic/vop/vop_main.c    |  70 +-----------
 drivers/misc/mic/vop/vop_vringh.c  | 166 ++++++++++-------------------
 include/uapi/linux/mic_common.h    |   9 +-
 7 files changed, 85 insertions(+), 218 deletions(-)
Signature · 1 line
2.17.1