Skip to content

Remove usage of the deprecated "pci-dma-compat.h" API

Christophe JAILLET dmaengine kernel-janitors linux-alpha linux-fpga linux-media linux-pci linux-scsi linuxppc-dev lkml oe-kbuild-all sparclinux 1 version Applied

Status from this message: Applied patches 10-15 to 5.17/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 42 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/16alpha: Remove usage of the deprecated "pci-dma-compat.h" APIarch/alpha/include/asm/floppy.h arch/alpha/kernel/pci_iommu.c+10 -91 reply
2/16floppy: Remove usage of the deprecated "pci-dma-compat.h" APIarch/powerpc/include/asm/floppy.h+5 -31 reply
3/16fpga: dfl: pci: Remove usage of the deprecated "pci-dma-compat.h" APIdrivers/fpga/dfl-pci.c+5 -104 replies
4/16media: Remove usage of the deprecated "pci-dma-compat.h" APIdrivers/media/pci/cx18/cx18-queue.h drivers/media/pci/ivtv/ivtv-queue.h drivers/media/pci/ivtv/ivtv-udma.h+21 -184 replies
5/16agp/intel: Remove usage of the deprecated "pci-dma-compat.h" APIdrivers/char/agp/intel-gtt.c+13 -132 replies
6/16sparc: Remove usage of the deprecated "pci-dma-compat.h" APIarch/sparc/kernel/ioport.c+1 -13 replies
7/16dmaengine: pch_dma: Remove usage of the deprecated "pci-dma-compat.h" APIdrivers/dma/pch_dma.c+1 -13 replies
8/16rapidio/tsi721: Remove usage of the deprecated "pci-dma-compat.h" APIdrivers/rapidio/devices/tsi721.c+4 -42 replies
9/16media: v4l2-pci-skeleton: Remove usage of the deprecated "pci-dma-compat.h" APIsamples/v4l/v4l2-pci-skeleton.c+1 -12 replies
10/16scsi: message: fusion: Remove usage of the deprecated "pci-dma-compat.h" APIdrivers/message/fusion/mptbase.c drivers/message/fusion/mptctl.c drivers/message/fusion/mptlan.c +1 more+154 -1321 reply
11/16scsi: mptbase: Use dma_alloc_coherent() in 'mpt_alloc_fw_memory()'drivers/message/fusion/mptbase.c+2 -11 reply
12/16scsi: mptbase: Use dma_alloc_coherent()drivers/message/fusion/mptbase.c+32 -201 reply
13/16scsi: mptsas: Use dma_alloc_coherent() in mptsas_exp_repmanufacture_info()drivers/message/fusion/mptsas.c+2 -11 reply
14/16scsi: mptsas: Use dma_alloc_coherent()drivers/message/fusion/mptsas.c+20 -201 reply
15/16scsi: mptctl: Use dma_alloc_coherent()drivers/message/fusion/mptctl.c+19 -121 reply
16/16PCI: Remove usage of the deprecated "pci-dma-compat.h" APIinclude/linux/pci-dma-compat.h include/linux/pci.h+0 -1324 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchArnd BergmannChristoph HellwigXu YilunBjorn HelgaasMauro Carvalho ChehabDavid S. Miller
1/16R-b R-b
2/16R-b R-b
3/16R-b R-b R-b
4/16R-b R-b A-b
5/16R-b R-b
6/16R-b R-b A-b
7/16R-b R-b
8/16R-b R-b
9/16R-b R-b
10/16R-b
11/16R-b
12/16R-b
13/16R-b
14/16R-b
15/16R-b
16/16A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [PATCH 00/16] Remove usage of the deprecated "pci-dma-compat.h" API

This serie axes all the remaining usages of the deprecated "pci-dma-compat.h" API.

All these patches have already been posted.

They have been generated with a coccinelle script.
The tricky parts are patches that use dma_alloc_coherent() because the correct GFP flag has to be used in place of the previous embedded GFP_ATOMIC.

Patches 1-3 are already Reviewed. References to the corresponding mail is given below the ---

Patch 1-2,4-10 are just generated from the coccinelle script. Only too long lines have been hand modified. dma_alloc_coherent() modification are NOT part of these patches.

Patch 3 also includes some 'dma_set_mask_and_coherent()' instead of 'pci_set_dma_mask()/pci_set_consistent_dma_mask()'.
I've left this additional modification because it was reviewed with it.

Patch 10-15 are the tricky parts. Explanation of which GFP flag is the right one is given in each patch. It has been divided in several patches to ease review.

Patch 15 is the only one I'm slighly unsure with. The old code was using a GFP_USER flag in the function. I'm not familiar with it.
I *guess* that GFP_KERNEL is fine, but maybe it should also be GFP_USER or left as GFP_ATOMIC so that nothing is changed.

Patch 16 is the last step that remove "pci-dma-compat.h" and its only usage.

All patches, exept 1-2,6 that are architecture specific, have been compile tested.

After all that, a few rst files, 1 or 2 strings in error messages and some error branching labels should still need some attention.
This is some minor issues.

Only the cover letter is sent to every one. Each patch is sent to the corresponding maintainer(s) + Andrew Morton, Christoph Hellwig and Arnd Bergmann.

Best regards.

Christophe JAILLET (16):
alpha: Remove usage of the deprecated "pci-dma-compat.h" API
floppy: Remove usage of the deprecated "pci-dma-compat.h" API
fpga: dfl: pci: Remove usage of the deprecated "pci-dma-compat.h" API
media: Remove usage of the deprecated "pci-dma-compat.h" API agp/intel: Remove usage of the deprecated "pci-dma-compat.h" API
sparc: Remove usage of the deprecated "pci-dma-compat.h" API
dmaengine: pch_dma: Remove usage of the deprecated "pci-dma-compat.h"
API
rapidio/tsi721: Remove usage of the deprecated "pci-dma-compat.h" API
media: v4l2-pci-skeleton: Remove usage of the deprecated
"pci-dma-compat.h" API
scsi: message: fusion: Remove usage of the deprecated
"pci-dma-compat.h" API
scsi: mptbase: Use dma_alloc_coherent() in 'mpt_alloc_fw_memory()'
scsi: mptbase: Use dma_alloc_coherent()
scsi: mptsas: Use dma_alloc_coherent() in
mptsas_exp_repmanufacture_info()
scsi: mptsas: Use dma_alloc_coherent()
scsi: mptctl: Use dma_alloc_coherent()
PCI: Remove usage of the deprecated "pci-dma-compat.h" API

 arch/alpha/include/asm/floppy.h     |   7 +-
 arch/alpha/kernel/pci_iommu.c       |  12 +--
 arch/powerpc/include/asm/floppy.h   |   8 +-
 arch/sparc/kernel/ioport.c          |   2 +-
 drivers/char/agp/intel-gtt.c        |  26 ++---
 drivers/dma/pch_dma.c               |   2 +-
 drivers/fpga/dfl-pci.c              |  14 +--
 drivers/media/pci/cx18/cx18-queue.h |   6 +-
 drivers/media/pci/ivtv/ivtv-queue.h |  25 +++--
 drivers/media/pci/ivtv/ivtv-udma.h  |   8 +-
 drivers/message/fusion/mptbase.c    | 149 ++++++++++++++++------------
 drivers/message/fusion/mptctl.c     |  82 +++++++++------
 drivers/message/fusion/mptlan.c     |  90 +++++++++--------
 drivers/message/fusion/mptsas.c     |  94 +++++++++---------
 drivers/rapidio/devices/tsi721.c    |   8 +-
 include/linux/pci-dma-compat.h      | 129 ------------------------
 include/linux/pci.h                 |   3 -
 samples/v4l/v4l2-pci-skeleton.c     |   2 +-
 18 files changed, 289 insertions(+), 378 deletions(-)
 delete mode 100644 include/linux/pci-dma-compat.h
Signature · 1 line
2.32.0