Skip to contentSkip to conversation

iommu/vtd: Cleanup dma_remapping.h header

PATCH Superseded Lu Baolu 2 participants 3 messages Nov 10, 2018 – Nov 12, 2018

Subsystems (7)
DRM drivers x86 DRM misc Intel i915 +3 more subsystems

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Lu Baolu

author
#0 lore raw

PATCH 1/1 iommu/vtd: Cleanup dma_remapping.h header

Commit e61d98d8dad00 ("x64, x2apic/intr-remap: Intel vt-d, IOMMU code reorganization") moved dma_remapping.h from drivers/pci/ to current place. It is entirely VT-d specific, but uses a generic name. This merges dma_remapping.h with include/linux/intel-iommu.h and removes dma_remapping.h as the result.

Cc Ashok Raj <[email protected]>
Cc Jacob Pan <jacob.jun.pan-VuQAYsv1563Yd54FQh9/[email protected]>
Cc Sohil Mehta <[email protected]>
---
 arch/x86/kernel/tboot.c                    |  2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  2 +-
 drivers/gpu/drm/i915/intel_display.c       |  2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c        |  2 +-
 drivers/misc/mic/scif/scif_rma.c           |  2 +-
 drivers/misc/mic/scif/scif_rma.h           |  2 +-
 include/linux/dma_remapping.h              | 58 ----------------------
 include/linux/intel-iommu.h                | 49 +++++++++++++++++-
 8 files changed, 53 insertions(+), 66 deletions(-)
 delete mode 100644 include/linux/dma_remapping.h
arch/x86/kernel/tboot.c +1 -1
index a2486f444073..6e5ef8fb8a02 100644
@@ -19,7 +19,7 @@
  *
  */
 
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>
 #include <linux/init_task.h>
 #include <linux/spinlock.h>
 #include <linux/export.h>
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
index 09187286d346..d8ccc77fdbaf 100644
@@ -26,7 +26,7 @@
  *
  */
 
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>
 #include <linux/reservation.h>
 #include <linux/sync_file.h>
 #include <linux/uaccess.h>
drivers/gpu/drm/i915/intel_display.c +1 -1
index 9741cc419e1b..45334a84fab1 100644
@@ -47,7 +47,7 @@
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_rect.h>
 #include <drm/drm_atomic_uapi.h>
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>
 #include <linux/reservation.h>
 
 /* Primary plane formats for gen <= 3 */
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 -1
index 61a84b958d67..c3e80a3b09fc 100644
@@ -34,7 +34,7 @@
 #include <drm/ttm/ttm_placement.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_module.h>
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>
 
 #define VMWGFX_DRIVER_DESC "Linux drm driver for VMware graphics devices"
 #define VMWGFX_CHIP_SVGAII 0
drivers/misc/mic/scif/scif_rma.c +1 -1
index c824329f7012..b441f6b0c743 100644
@@ -15,7 +15,7 @@
  * Intel SCIF driver.
  *
  */
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>
 #include <linux/pagemap.h>
 #include <linux/sched/mm.h>
 #include <linux/sched/signal.h>
drivers/misc/mic/scif/scif_rma.h +1 -1
index fa6722279196..d90a06d4e93b 100644
@@ -53,7 +53,7 @@
 #ifndef SCIF_RMA_H
 #define SCIF_RMA_H
 
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>
 #include <linux/mmu_notifier.h>
 
 #include "../bus/scif_bus.h"
include/linux/dma_remapping.h deleted +0 -58

58 lines not on this page · raw message

include/linux/intel-iommu.h +47 -2

67 lines not on this page · raw message

Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Lu Baolu

Commit e61d98d8dad00 ("x64, x2apic/intr-remap: Intel vt-d, IOMMU code reorganization") moved dma_remapping.h from drivers/pci/ to current place. It is entirely VT-d specific, but uses a generic name. This merges dma_remapping.h with include/linux/intel-iommu.h and removes dma_remapping.h as the result.

This looks fine to me, thanks for doing the work.

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c line 37

Quoted 8 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 -1
@@ -34,7 +34,7 @@
 #include <drm/ttm/ttm_placement.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_module.h>
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>

Btw, I don't think this driver has any business looking at Intel IOMMU driver internals, and the code doing so is more than gross.

Not really your job, but vmw_dma_select_mode really needs a rewrite with someone that has at least half a clue, and some taste.

Eventually we should also drop the intel_iommu_enabled export.

author
#2 lore raw

Hi,

Quoted 10 lines · Christoph Hellwig
Quoted 5 lines · Lu Baolu

Commit e61d98d8dad00 ("x64, x2apic/intr-remap: Intel vt-d, IOMMU code reorganization") moved dma_remapping.h from drivers/pci/ to current place. It is entirely VT-d specific, but uses a generic name. This merges dma_remapping.h with include/linux/intel-iommu.h and removes dma_remapping.h as the result.

This looks fine to me, thanks for doing the work.

Thank you.

Quoted 13 lines

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c line 37

Quoted 9 lines
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 -1
@@ -34,7 +34,7 @@
  #include <drm/ttm/ttm_placement.h>
  #include <drm/ttm/ttm_bo_driver.h>
  #include <drm/ttm/ttm_module.h>
-#include <linux/dma_remapping.h>
+#include <linux/intel-iommu.h>

Btw, I don't think this driver has any business looking at Intel IOMMU driver internals, and the code doing so is more than gross.

Quoted 5 lines

Not really your job, but vmw_dma_select_mode really needs a rewrite with someone that has at least half a clue, and some taste.

Eventually we should also drop the intel_iommu_enabled export.

Yes. Fair enough.

Best regards,
Lu Baolu