All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iommu: Move Intel and AMD drivers into their own subdirectory
@ 2020-06-09 13:03 ` Joerg Roedel
  0 siblings, 0 replies; 10+ messages in thread
From: Joerg Roedel @ 2020-06-09 13:03 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: David Woodhouse, Lu Baolu, Suravee Suthikulpanit,
	Jerry Snitselaar, Qian Cai, iommu, linux-kernel

Hi,

here is the updated version of the changes to move the Intel and AMD
IOMMU drivers into their own subdirectories. This time with updated
MAINTAINERS file entries.

Regards,

	Joerg

Joerg Roedel (2):
  iommu/amd: Move AMD IOMMU driver into subdirectory
  iommu/vt-d: Move Intel IOMMU driver into subdirectory

 MAINTAINERS                                    |  5 ++---
 drivers/iommu/Makefile                         | 18 +++++++++---------
 drivers/iommu/{ => amd}/amd_iommu.h            |  0
 drivers/iommu/{ => amd}/amd_iommu_types.h      |  0
 .../{amd_iommu_debugfs.c => amd/debugfs.c}     |  0
 drivers/iommu/{amd_iommu_init.c => amd/init.c} |  2 +-
 drivers/iommu/{amd_iommu.c => amd/iommu.c}     |  2 +-
 .../iommu/{amd_iommu_v2.c => amd/iommu_v2.c}   |  0
 .../iommu/{amd_iommu_quirks.c => amd/quirks.c} |  0
 .../{intel-iommu-debugfs.c => intel/debugfs.c} |  0
 drivers/iommu/{ => intel}/dmar.c               |  2 +-
 drivers/iommu/{ => intel}/intel-pasid.h        |  0
 drivers/iommu/{intel-iommu.c => intel/iommu.c} |  2 +-
 .../irq_remapping.c}                           |  2 +-
 drivers/iommu/{intel-pasid.c => intel/pasid.c} |  0
 drivers/iommu/{intel-svm.c => intel/svm.c}     |  0
 drivers/iommu/{intel-trace.c => intel/trace.c} |  0
 17 files changed, 16 insertions(+), 17 deletions(-)
 rename drivers/iommu/{ => amd}/amd_iommu.h (100%)
 rename drivers/iommu/{ => amd}/amd_iommu_types.h (100%)
 rename drivers/iommu/{amd_iommu_debugfs.c => amd/debugfs.c} (100%)
 rename drivers/iommu/{amd_iommu_init.c => amd/init.c} (99%)
 rename drivers/iommu/{amd_iommu.c => amd/iommu.c} (99%)
 rename drivers/iommu/{amd_iommu_v2.c => amd/iommu_v2.c} (100%)
 rename drivers/iommu/{amd_iommu_quirks.c => amd/quirks.c} (100%)
 rename drivers/iommu/{intel-iommu-debugfs.c => intel/debugfs.c} (100%)
 rename drivers/iommu/{ => intel}/dmar.c (99%)
 rename drivers/iommu/{ => intel}/intel-pasid.h (100%)
 rename drivers/iommu/{intel-iommu.c => intel/iommu.c} (99%)
 rename drivers/iommu/{intel_irq_remapping.c => intel/irq_remapping.c} (99%)
 rename drivers/iommu/{intel-pasid.c => intel/pasid.c} (100%)
 rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%)
 rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%)

-- 
2.17.1


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

* [PATCH v2 0/2] iommu: Move Intel and AMD drivers into their own subdirectory
@ 2020-06-09 13:03 ` Joerg Roedel
  0 siblings, 0 replies; 10+ messages in thread
From: Joerg Roedel @ 2020-06-09 13:03 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-kernel, iommu, David Woodhouse

Hi,

here is the updated version of the changes to move the Intel and AMD
IOMMU drivers into their own subdirectories. This time with updated
MAINTAINERS file entries.

Regards,

	Joerg

Joerg Roedel (2):
  iommu/amd: Move AMD IOMMU driver into subdirectory
  iommu/vt-d: Move Intel IOMMU driver into subdirectory

 MAINTAINERS                                    |  5 ++---
 drivers/iommu/Makefile                         | 18 +++++++++---------
 drivers/iommu/{ => amd}/amd_iommu.h            |  0
 drivers/iommu/{ => amd}/amd_iommu_types.h      |  0
 .../{amd_iommu_debugfs.c => amd/debugfs.c}     |  0
 drivers/iommu/{amd_iommu_init.c => amd/init.c} |  2 +-
 drivers/iommu/{amd_iommu.c => amd/iommu.c}     |  2 +-
 .../iommu/{amd_iommu_v2.c => amd/iommu_v2.c}   |  0
 .../iommu/{amd_iommu_quirks.c => amd/quirks.c} |  0
 .../{intel-iommu-debugfs.c => intel/debugfs.c} |  0
 drivers/iommu/{ => intel}/dmar.c               |  2 +-
 drivers/iommu/{ => intel}/intel-pasid.h        |  0
 drivers/iommu/{intel-iommu.c => intel/iommu.c} |  2 +-
 .../irq_remapping.c}                           |  2 +-
 drivers/iommu/{intel-pasid.c => intel/pasid.c} |  0
 drivers/iommu/{intel-svm.c => intel/svm.c}     |  0
 drivers/iommu/{intel-trace.c => intel/trace.c} |  0
 17 files changed, 16 insertions(+), 17 deletions(-)
 rename drivers/iommu/{ => amd}/amd_iommu.h (100%)
 rename drivers/iommu/{ => amd}/amd_iommu_types.h (100%)
 rename drivers/iommu/{amd_iommu_debugfs.c => amd/debugfs.c} (100%)
 rename drivers/iommu/{amd_iommu_init.c => amd/init.c} (99%)
 rename drivers/iommu/{amd_iommu.c => amd/iommu.c} (99%)
 rename drivers/iommu/{amd_iommu_v2.c => amd/iommu_v2.c} (100%)
 rename drivers/iommu/{amd_iommu_quirks.c => amd/quirks.c} (100%)
 rename drivers/iommu/{intel-iommu-debugfs.c => intel/debugfs.c} (100%)
 rename drivers/iommu/{ => intel}/dmar.c (99%)
 rename drivers/iommu/{ => intel}/intel-pasid.h (100%)
 rename drivers/iommu/{intel-iommu.c => intel/iommu.c} (99%)
 rename drivers/iommu/{intel_irq_remapping.c => intel/irq_remapping.c} (99%)
 rename drivers/iommu/{intel-pasid.c => intel/pasid.c} (100%)
 rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%)
 rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%)

-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory
  2020-06-09 13:03 ` Joerg Roedel
@ 2020-06-09 13:03   ` Joerg Roedel
  -1 siblings, 0 replies; 10+ messages in thread
From: Joerg Roedel @ 2020-06-09 13:03 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: David Woodhouse, Lu Baolu, Suravee Suthikulpanit,
	Jerry Snitselaar, Qian Cai, iommu, linux-kernel, Joerg Roedel

From: Joerg Roedel <jroedel@suse.de>

Move all files related to the AMD IOMMU driver into its own
subdirectory.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
 MAINTAINERS                                          | 2 +-
 drivers/iommu/Makefile                               | 6 +++---
 drivers/iommu/{ => amd}/amd_iommu.h                  | 0
 drivers/iommu/{ => amd}/amd_iommu_types.h            | 0
 drivers/iommu/{amd_iommu_debugfs.c => amd/debugfs.c} | 0
 drivers/iommu/{amd_iommu_init.c => amd/init.c}       | 2 +-
 drivers/iommu/{amd_iommu.c => amd/iommu.c}           | 2 +-
 drivers/iommu/{amd_iommu_v2.c => amd/iommu_v2.c}     | 0
 drivers/iommu/{amd_iommu_quirks.c => amd/quirks.c}   | 0
 9 files changed, 6 insertions(+), 6 deletions(-)
 rename drivers/iommu/{ => amd}/amd_iommu.h (100%)
 rename drivers/iommu/{ => amd}/amd_iommu_types.h (100%)
 rename drivers/iommu/{amd_iommu_debugfs.c => amd/debugfs.c} (100%)
 rename drivers/iommu/{amd_iommu_init.c => amd/init.c} (99%)
 rename drivers/iommu/{amd_iommu.c => amd/iommu.c} (99%)
 rename drivers/iommu/{amd_iommu_v2.c => amd/iommu_v2.c} (100%)
 rename drivers/iommu/{amd_iommu_quirks.c => amd/quirks.c} (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 77a3fa5e3edd..c2c31d3f8ae4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -884,7 +884,7 @@ M:	Joerg Roedel <joro@8bytes.org>
 L:	iommu@lists.linux-foundation.org
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
-F:	drivers/iommu/amd_iommu*.[ch]
+F:	drivers/iommu/amd/
 F:	include/linux/amd-iommu.h
 
 AMD KFD
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 57cf4ba5e27c..3af7e374b0cb 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -11,9 +11,9 @@ obj-$(CONFIG_IOASID) += ioasid.o
 obj-$(CONFIG_IOMMU_IOVA) += iova.o
 obj-$(CONFIG_OF_IOMMU)	+= of_iommu.o
 obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
-obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o amd_iommu_quirks.o
-obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd_iommu_debugfs.o
-obj-$(CONFIG_AMD_IOMMU_V2) += amd_iommu_v2.o
+obj-$(CONFIG_AMD_IOMMU) += amd/iommu.o amd/init.o amd/quirks.o
+obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd/debugfs.o
+obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
 obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
 arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
 obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
diff --git a/drivers/iommu/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h
similarity index 100%
rename from drivers/iommu/amd_iommu.h
rename to drivers/iommu/amd/amd_iommu.h
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
similarity index 100%
rename from drivers/iommu/amd_iommu_types.h
rename to drivers/iommu/amd/amd_iommu_types.h
diff --git a/drivers/iommu/amd_iommu_debugfs.c b/drivers/iommu/amd/debugfs.c
similarity index 100%
rename from drivers/iommu/amd_iommu_debugfs.c
rename to drivers/iommu/amd/debugfs.c
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd/init.c
similarity index 99%
rename from drivers/iommu/amd_iommu_init.c
rename to drivers/iommu/amd/init.c
index 3faff7f80fd2..6ebd4825e320 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd/init.c
@@ -33,7 +33,7 @@
 #include <linux/crash_dump.h>
 
 #include "amd_iommu.h"
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 /*
  * definitions for the ACPI scanning code
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd/iommu.c
similarity index 99%
rename from drivers/iommu/amd_iommu.c
rename to drivers/iommu/amd/iommu.c
index 311ef7105c6d..74cca1757172 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -43,7 +43,7 @@
 #include <asm/dma.h>
 
 #include "amd_iommu.h"
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28))
 
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd/iommu_v2.c
similarity index 100%
rename from drivers/iommu/amd_iommu_v2.c
rename to drivers/iommu/amd/iommu_v2.c
diff --git a/drivers/iommu/amd_iommu_quirks.c b/drivers/iommu/amd/quirks.c
similarity index 100%
rename from drivers/iommu/amd_iommu_quirks.c
rename to drivers/iommu/amd/quirks.c
-- 
2.17.1


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

* [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory
@ 2020-06-09 13:03   ` Joerg Roedel
  0 siblings, 0 replies; 10+ messages in thread
From: Joerg Roedel @ 2020-06-09 13:03 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Joerg Roedel, linux-kernel, iommu, David Woodhouse

From: Joerg Roedel <jroedel@suse.de>

Move all files related to the AMD IOMMU driver into its own
subdirectory.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
 MAINTAINERS                                          | 2 +-
 drivers/iommu/Makefile                               | 6 +++---
 drivers/iommu/{ => amd}/amd_iommu.h                  | 0
 drivers/iommu/{ => amd}/amd_iommu_types.h            | 0
 drivers/iommu/{amd_iommu_debugfs.c => amd/debugfs.c} | 0
 drivers/iommu/{amd_iommu_init.c => amd/init.c}       | 2 +-
 drivers/iommu/{amd_iommu.c => amd/iommu.c}           | 2 +-
 drivers/iommu/{amd_iommu_v2.c => amd/iommu_v2.c}     | 0
 drivers/iommu/{amd_iommu_quirks.c => amd/quirks.c}   | 0
 9 files changed, 6 insertions(+), 6 deletions(-)
 rename drivers/iommu/{ => amd}/amd_iommu.h (100%)
 rename drivers/iommu/{ => amd}/amd_iommu_types.h (100%)
 rename drivers/iommu/{amd_iommu_debugfs.c => amd/debugfs.c} (100%)
 rename drivers/iommu/{amd_iommu_init.c => amd/init.c} (99%)
 rename drivers/iommu/{amd_iommu.c => amd/iommu.c} (99%)
 rename drivers/iommu/{amd_iommu_v2.c => amd/iommu_v2.c} (100%)
 rename drivers/iommu/{amd_iommu_quirks.c => amd/quirks.c} (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 77a3fa5e3edd..c2c31d3f8ae4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -884,7 +884,7 @@ M:	Joerg Roedel <joro@8bytes.org>
 L:	iommu@lists.linux-foundation.org
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
-F:	drivers/iommu/amd_iommu*.[ch]
+F:	drivers/iommu/amd/
 F:	include/linux/amd-iommu.h
 
 AMD KFD
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 57cf4ba5e27c..3af7e374b0cb 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -11,9 +11,9 @@ obj-$(CONFIG_IOASID) += ioasid.o
 obj-$(CONFIG_IOMMU_IOVA) += iova.o
 obj-$(CONFIG_OF_IOMMU)	+= of_iommu.o
 obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
-obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o amd_iommu_quirks.o
-obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd_iommu_debugfs.o
-obj-$(CONFIG_AMD_IOMMU_V2) += amd_iommu_v2.o
+obj-$(CONFIG_AMD_IOMMU) += amd/iommu.o amd/init.o amd/quirks.o
+obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd/debugfs.o
+obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
 obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
 arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
 obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
diff --git a/drivers/iommu/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h
similarity index 100%
rename from drivers/iommu/amd_iommu.h
rename to drivers/iommu/amd/amd_iommu.h
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
similarity index 100%
rename from drivers/iommu/amd_iommu_types.h
rename to drivers/iommu/amd/amd_iommu_types.h
diff --git a/drivers/iommu/amd_iommu_debugfs.c b/drivers/iommu/amd/debugfs.c
similarity index 100%
rename from drivers/iommu/amd_iommu_debugfs.c
rename to drivers/iommu/amd/debugfs.c
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd/init.c
similarity index 99%
rename from drivers/iommu/amd_iommu_init.c
rename to drivers/iommu/amd/init.c
index 3faff7f80fd2..6ebd4825e320 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd/init.c
@@ -33,7 +33,7 @@
 #include <linux/crash_dump.h>
 
 #include "amd_iommu.h"
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 /*
  * definitions for the ACPI scanning code
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd/iommu.c
similarity index 99%
rename from drivers/iommu/amd_iommu.c
rename to drivers/iommu/amd/iommu.c
index 311ef7105c6d..74cca1757172 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -43,7 +43,7 @@
 #include <asm/dma.h>
 
 #include "amd_iommu.h"
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28))
 
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd/iommu_v2.c
similarity index 100%
rename from drivers/iommu/amd_iommu_v2.c
rename to drivers/iommu/amd/iommu_v2.c
diff --git a/drivers/iommu/amd_iommu_quirks.c b/drivers/iommu/amd/quirks.c
similarity index 100%
rename from drivers/iommu/amd_iommu_quirks.c
rename to drivers/iommu/amd/quirks.c
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* [PATCH v2 2/2] iommu/vt-d: Move Intel IOMMU driver into subdirectory
  2020-06-09 13:03 ` Joerg Roedel
@ 2020-06-09 13:03   ` Joerg Roedel
  -1 siblings, 0 replies; 10+ messages in thread
From: Joerg Roedel @ 2020-06-09 13:03 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: David Woodhouse, Lu Baolu, Suravee Suthikulpanit,
	Jerry Snitselaar, Qian Cai, iommu, linux-kernel, Joerg Roedel

From: Joerg Roedel <jroedel@suse.de>

Move all files related to the Intel IOMMU driver into its own
subdirectory.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
 MAINTAINERS                                          |  3 +--
 drivers/iommu/Makefile                               | 12 ++++++------
 .../iommu/{intel-iommu-debugfs.c => intel/debugfs.c} |  0
 drivers/iommu/{ => intel}/dmar.c                     |  2 +-
 drivers/iommu/{ => intel}/intel-pasid.h              |  0
 drivers/iommu/{intel-iommu.c => intel/iommu.c}       |  2 +-
 .../{intel_irq_remapping.c => intel/irq_remapping.c} |  2 +-
 drivers/iommu/{intel-pasid.c => intel/pasid.c}       |  0
 drivers/iommu/{intel-svm.c => intel/svm.c}           |  0
 drivers/iommu/{intel-trace.c => intel/trace.c}       |  0
 10 files changed, 10 insertions(+), 11 deletions(-)
 rename drivers/iommu/{intel-iommu-debugfs.c => intel/debugfs.c} (100%)
 rename drivers/iommu/{ => intel}/dmar.c (99%)
 rename drivers/iommu/{ => intel}/intel-pasid.h (100%)
 rename drivers/iommu/{intel-iommu.c => intel/iommu.c} (99%)
 rename drivers/iommu/{intel_irq_remapping.c => intel/irq_remapping.c} (99%)
 rename drivers/iommu/{intel-pasid.c => intel/pasid.c} (100%)
 rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%)
 rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index c2c31d3f8ae4..fa2078dd57d3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8716,8 +8716,7 @@ M:	Lu Baolu <baolu.lu@linux.intel.com>
 L:	iommu@lists.linux-foundation.org
 S:	Supported
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
-F:	drivers/iommu/dmar.c
-F:	drivers/iommu/intel*.[ch]
+F:	drivers/iommu/intel/
 F:	include/linux/intel-iommu.h
 F:	include/linux/intel-svm.h
 
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 3af7e374b0cb..342190196dfb 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -17,13 +17,13 @@ obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
 obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
 arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
 obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
-obj-$(CONFIG_DMAR_TABLE) += dmar.o
-obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o
-obj-$(CONFIG_INTEL_IOMMU) += intel-trace.o
-obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel-iommu-debugfs.o
-obj-$(CONFIG_INTEL_IOMMU_SVM) += intel-svm.o
+obj-$(CONFIG_DMAR_TABLE) += intel/dmar.o
+obj-$(CONFIG_INTEL_IOMMU) += intel/iommu.o intel/pasid.o
+obj-$(CONFIG_INTEL_IOMMU) += intel/trace.o
+obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel/debugfs.o
+obj-$(CONFIG_INTEL_IOMMU_SVM) += intel/svm.o
 obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
-obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
+obj-$(CONFIG_IRQ_REMAP) += intel/irq_remapping.o irq_remapping.o
 obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
 obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
 obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
diff --git a/drivers/iommu/intel-iommu-debugfs.c b/drivers/iommu/intel/debugfs.c
similarity index 100%
rename from drivers/iommu/intel-iommu-debugfs.c
rename to drivers/iommu/intel/debugfs.c
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/intel/dmar.c
similarity index 99%
rename from drivers/iommu/dmar.c
rename to drivers/iommu/intel/dmar.c
index 60a2970c37ff..cc46dff98fa0 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -32,7 +32,7 @@
 #include <asm/irq_remapping.h>
 #include <asm/iommu_table.h>
 
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 typedef int (*dmar_res_handler_t)(struct acpi_dmar_header *, void *);
 struct dmar_res_callback {
diff --git a/drivers/iommu/intel-pasid.h b/drivers/iommu/intel/intel-pasid.h
similarity index 100%
rename from drivers/iommu/intel-pasid.h
rename to drivers/iommu/intel/intel-pasid.h
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel/iommu.c
similarity index 99%
rename from drivers/iommu/intel-iommu.c
rename to drivers/iommu/intel/iommu.c
index 648a785e078a..9129663a7406 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -47,7 +47,7 @@
 #include <asm/iommu.h>
 #include <trace/events/intel_iommu.h>
 
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 #include "intel-pasid.h"
 
 #define ROOT_SIZE		VTD_PAGE_SIZE
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
similarity index 99%
rename from drivers/iommu/intel_irq_remapping.c
rename to drivers/iommu/intel/irq_remapping.c
index a042f123b091..7f8769800815 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel/irq_remapping.c
@@ -21,7 +21,7 @@
 #include <asm/pci-direct.h>
 #include <asm/msidef.h>
 
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 enum irq_mode {
 	IRQ_REMAPPING,
diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel/pasid.c
similarity index 100%
rename from drivers/iommu/intel-pasid.c
rename to drivers/iommu/intel/pasid.c
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel/svm.c
similarity index 100%
rename from drivers/iommu/intel-svm.c
rename to drivers/iommu/intel/svm.c
diff --git a/drivers/iommu/intel-trace.c b/drivers/iommu/intel/trace.c
similarity index 100%
rename from drivers/iommu/intel-trace.c
rename to drivers/iommu/intel/trace.c
-- 
2.17.1


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

* [PATCH v2 2/2] iommu/vt-d: Move Intel IOMMU driver into subdirectory
@ 2020-06-09 13:03   ` Joerg Roedel
  0 siblings, 0 replies; 10+ messages in thread
From: Joerg Roedel @ 2020-06-09 13:03 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Joerg Roedel, linux-kernel, iommu, David Woodhouse

From: Joerg Roedel <jroedel@suse.de>

Move all files related to the Intel IOMMU driver into its own
subdirectory.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
 MAINTAINERS                                          |  3 +--
 drivers/iommu/Makefile                               | 12 ++++++------
 .../iommu/{intel-iommu-debugfs.c => intel/debugfs.c} |  0
 drivers/iommu/{ => intel}/dmar.c                     |  2 +-
 drivers/iommu/{ => intel}/intel-pasid.h              |  0
 drivers/iommu/{intel-iommu.c => intel/iommu.c}       |  2 +-
 .../{intel_irq_remapping.c => intel/irq_remapping.c} |  2 +-
 drivers/iommu/{intel-pasid.c => intel/pasid.c}       |  0
 drivers/iommu/{intel-svm.c => intel/svm.c}           |  0
 drivers/iommu/{intel-trace.c => intel/trace.c}       |  0
 10 files changed, 10 insertions(+), 11 deletions(-)
 rename drivers/iommu/{intel-iommu-debugfs.c => intel/debugfs.c} (100%)
 rename drivers/iommu/{ => intel}/dmar.c (99%)
 rename drivers/iommu/{ => intel}/intel-pasid.h (100%)
 rename drivers/iommu/{intel-iommu.c => intel/iommu.c} (99%)
 rename drivers/iommu/{intel_irq_remapping.c => intel/irq_remapping.c} (99%)
 rename drivers/iommu/{intel-pasid.c => intel/pasid.c} (100%)
 rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%)
 rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index c2c31d3f8ae4..fa2078dd57d3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8716,8 +8716,7 @@ M:	Lu Baolu <baolu.lu@linux.intel.com>
 L:	iommu@lists.linux-foundation.org
 S:	Supported
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
-F:	drivers/iommu/dmar.c
-F:	drivers/iommu/intel*.[ch]
+F:	drivers/iommu/intel/
 F:	include/linux/intel-iommu.h
 F:	include/linux/intel-svm.h
 
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 3af7e374b0cb..342190196dfb 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -17,13 +17,13 @@ obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
 obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
 arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
 obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
-obj-$(CONFIG_DMAR_TABLE) += dmar.o
-obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o
-obj-$(CONFIG_INTEL_IOMMU) += intel-trace.o
-obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel-iommu-debugfs.o
-obj-$(CONFIG_INTEL_IOMMU_SVM) += intel-svm.o
+obj-$(CONFIG_DMAR_TABLE) += intel/dmar.o
+obj-$(CONFIG_INTEL_IOMMU) += intel/iommu.o intel/pasid.o
+obj-$(CONFIG_INTEL_IOMMU) += intel/trace.o
+obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel/debugfs.o
+obj-$(CONFIG_INTEL_IOMMU_SVM) += intel/svm.o
 obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
-obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
+obj-$(CONFIG_IRQ_REMAP) += intel/irq_remapping.o irq_remapping.o
 obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
 obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
 obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
diff --git a/drivers/iommu/intel-iommu-debugfs.c b/drivers/iommu/intel/debugfs.c
similarity index 100%
rename from drivers/iommu/intel-iommu-debugfs.c
rename to drivers/iommu/intel/debugfs.c
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/intel/dmar.c
similarity index 99%
rename from drivers/iommu/dmar.c
rename to drivers/iommu/intel/dmar.c
index 60a2970c37ff..cc46dff98fa0 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -32,7 +32,7 @@
 #include <asm/irq_remapping.h>
 #include <asm/iommu_table.h>
 
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 typedef int (*dmar_res_handler_t)(struct acpi_dmar_header *, void *);
 struct dmar_res_callback {
diff --git a/drivers/iommu/intel-pasid.h b/drivers/iommu/intel/intel-pasid.h
similarity index 100%
rename from drivers/iommu/intel-pasid.h
rename to drivers/iommu/intel/intel-pasid.h
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel/iommu.c
similarity index 99%
rename from drivers/iommu/intel-iommu.c
rename to drivers/iommu/intel/iommu.c
index 648a785e078a..9129663a7406 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -47,7 +47,7 @@
 #include <asm/iommu.h>
 #include <trace/events/intel_iommu.h>
 
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 #include "intel-pasid.h"
 
 #define ROOT_SIZE		VTD_PAGE_SIZE
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
similarity index 99%
rename from drivers/iommu/intel_irq_remapping.c
rename to drivers/iommu/intel/irq_remapping.c
index a042f123b091..7f8769800815 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel/irq_remapping.c
@@ -21,7 +21,7 @@
 #include <asm/pci-direct.h>
 #include <asm/msidef.h>
 
-#include "irq_remapping.h"
+#include "../irq_remapping.h"
 
 enum irq_mode {
 	IRQ_REMAPPING,
diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel/pasid.c
similarity index 100%
rename from drivers/iommu/intel-pasid.c
rename to drivers/iommu/intel/pasid.c
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel/svm.c
similarity index 100%
rename from drivers/iommu/intel-svm.c
rename to drivers/iommu/intel/svm.c
diff --git a/drivers/iommu/intel-trace.c b/drivers/iommu/intel/trace.c
similarity index 100%
rename from drivers/iommu/intel-trace.c
rename to drivers/iommu/intel/trace.c
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory
  2020-06-09 13:03   ` Joerg Roedel
@ 2020-06-10  1:25     ` kernel test robot
  -1 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2020-06-10  1:25 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: kbuild-all, clang-built-linux, David Woodhouse, Lu Baolu,
	Suravee Suthikulpanit, Jerry Snitselaar, Qian Cai, iommu,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 14815 bytes --]

Hi Joerg,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master next-20200609]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-Move-Intel-and-AMD-drivers-into-their-own-subdirectory/20200609-210928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-r026-20200607 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/iommu/amd/init.c:3073:19: warning: no previous prototype for function 'get_amd_iommu' [-Wmissing-prototypes]
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
drivers/iommu/amd/init.c:3073:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3092:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_banks' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
drivers/iommu/amd/init.c:3092:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3103:6: warning: no previous prototype for function 'amd_iommu_pc_supported' [-Wmissing-prototypes]
bool amd_iommu_pc_supported(void)
^
drivers/iommu/amd/init.c:3103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool amd_iommu_pc_supported(void)
^
static
>> drivers/iommu/amd/init.c:3109:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_counters' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
drivers/iommu/amd/init.c:3109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3158:5: warning: no previous prototype for function 'amd_iommu_pc_get_reg' [-Wmissing-prototypes]
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3158:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
>> drivers/iommu/amd/init.c:3167:5: warning: no previous prototype for function 'amd_iommu_pc_set_reg' [-Wmissing-prototypes]
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3167:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
6 warnings generated.

vim +/get_amd_iommu +3073 drivers/iommu/amd/init.c

30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3072  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3073  struct amd_iommu *get_amd_iommu(unsigned int idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3074  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3075  	unsigned int i = 0;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3076  	struct amd_iommu *iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3077  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3078  	for_each_iommu(iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3079  		if (i++ == idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3080  			return iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3081  	return NULL;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3082  }
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3083  EXPORT_SYMBOL(get_amd_iommu);
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3084  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3085  /****************************************************************************
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3086   *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3087   * IOMMU EFR Performance Counter support functionality. This code allows
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3088   * access to the IOMMU PC functionality.
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3089   *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3090   ****************************************************************************/
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3091  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3092  u8 amd_iommu_pc_get_max_banks(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3093  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3094  	struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3095  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3096  	if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3097  		return iommu->max_banks;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3098  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3099  	return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3100  }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3101  EXPORT_SYMBOL(amd_iommu_pc_get_max_banks);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3102  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05 @3103  bool amd_iommu_pc_supported(void)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3104  {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3105  	return amd_iommu_pc_present;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3106  }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3107  EXPORT_SYMBOL(amd_iommu_pc_supported);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3108  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3109  u8 amd_iommu_pc_get_max_counters(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3110  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3111  	struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3112  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3113  	if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3114  		return iommu->max_counters;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3115  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3116  	return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3117  }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3118  EXPORT_SYMBOL(amd_iommu_pc_get_max_counters);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3119  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3120  static int iommu_pc_get_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr,
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3121  				u8 fxn, u64 *value, bool is_write)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3122  {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3123  	u32 offset;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3124  	u32 max_offset_lim;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3125  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3126  	/* Make sure the IOMMU PC resource is available */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3127  	if (!amd_iommu_pc_present)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3128  		return -ENODEV;
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3129  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3130  	/* Check for valid iommu and pc register indexing */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3131  	if (WARN_ON(!iommu || (fxn > 0x28) || (fxn & 7)))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3132  		return -ENODEV;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3133  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3134  	offset = (u32)(((0x40 | bank) << 12) | (cntr << 8) | fxn);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3135  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3136  	/* Limit the offset to the hw defined mmio region aperture */
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3137  	max_offset_lim = (u32)(((0x40 | iommu->max_banks) << 12) |
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3138  				(iommu->max_counters << 8) | 0x28);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3139  	if ((offset < MMIO_CNTR_REG_OFFSET) ||
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3140  	    (offset > max_offset_lim))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3141  		return -EINVAL;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3142  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3143  	if (is_write) {
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3144  		u64 val = *value & GENMASK_ULL(47, 0);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3145  
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3146  		writel((u32)val, iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3147  		writel((val >> 32), iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3148  	} else {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3149  		*value = readl(iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3150  		*value <<= 32;
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3151  		*value |= readl(iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3152  		*value &= GENMASK_ULL(47, 0);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3153  	}
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3154  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3155  	return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3156  }
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23  3157  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3158  int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23  3159  {
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3160  	if (!iommu)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3161  		return -EINVAL;
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23  3162  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3163  	return iommu_pc_get_set_reg(iommu, bank, cntr, fxn, value, false);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3164  }
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3165  EXPORT_SYMBOL(amd_iommu_pc_get_reg);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3166  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3167  int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)

:::::: The code at line 3073 was first introduced by commit
:::::: f5863a00e73c432b91e4efe1d68778b4ace6a892 x86/events/amd/iommu.c: Modify functions to query max banks and counters

:::::: TO: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31625 bytes --]

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

* Re: [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory
@ 2020-06-10  1:25     ` kernel test robot
  0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2020-06-10  1:25 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: kbuild-all, linux-kernel, clang-built-linux, iommu, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 14815 bytes --]

Hi Joerg,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master next-20200609]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-Move-Intel-and-AMD-drivers-into-their-own-subdirectory/20200609-210928
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-r026-20200607 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/iommu/amd/init.c:3073:19: warning: no previous prototype for function 'get_amd_iommu' [-Wmissing-prototypes]
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
drivers/iommu/amd/init.c:3073:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3092:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_banks' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
drivers/iommu/amd/init.c:3092:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3103:6: warning: no previous prototype for function 'amd_iommu_pc_supported' [-Wmissing-prototypes]
bool amd_iommu_pc_supported(void)
^
drivers/iommu/amd/init.c:3103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool amd_iommu_pc_supported(void)
^
static
>> drivers/iommu/amd/init.c:3109:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_counters' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
drivers/iommu/amd/init.c:3109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3158:5: warning: no previous prototype for function 'amd_iommu_pc_get_reg' [-Wmissing-prototypes]
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3158:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
>> drivers/iommu/amd/init.c:3167:5: warning: no previous prototype for function 'amd_iommu_pc_set_reg' [-Wmissing-prototypes]
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3167:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
6 warnings generated.

vim +/get_amd_iommu +3073 drivers/iommu/amd/init.c

30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3072  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3073  struct amd_iommu *get_amd_iommu(unsigned int idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3074  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3075  	unsigned int i = 0;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3076  	struct amd_iommu *iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3077  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3078  	for_each_iommu(iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3079  		if (i++ == idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3080  			return iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3081  	return NULL;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3082  }
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3083  EXPORT_SYMBOL(get_amd_iommu);
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3084  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3085  /****************************************************************************
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3086   *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3087   * IOMMU EFR Performance Counter support functionality. This code allows
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3088   * access to the IOMMU PC functionality.
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3089   *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3090   ****************************************************************************/
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3091  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3092  u8 amd_iommu_pc_get_max_banks(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3093  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3094  	struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3095  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3096  	if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3097  		return iommu->max_banks;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3098  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3099  	return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3100  }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3101  EXPORT_SYMBOL(amd_iommu_pc_get_max_banks);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3102  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05 @3103  bool amd_iommu_pc_supported(void)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3104  {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3105  	return amd_iommu_pc_present;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3106  }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3107  EXPORT_SYMBOL(amd_iommu_pc_supported);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3108  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3109  u8 amd_iommu_pc_get_max_counters(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3110  {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3111  	struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3112  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3113  	if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3114  		return iommu->max_counters;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3115  
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3116  	return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3117  }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3118  EXPORT_SYMBOL(amd_iommu_pc_get_max_counters);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3119  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3120  static int iommu_pc_get_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr,
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3121  				u8 fxn, u64 *value, bool is_write)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3122  {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3123  	u32 offset;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3124  	u32 max_offset_lim;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3125  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3126  	/* Make sure the IOMMU PC resource is available */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3127  	if (!amd_iommu_pc_present)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3128  		return -ENODEV;
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3129  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3130  	/* Check for valid iommu and pc register indexing */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3131  	if (WARN_ON(!iommu || (fxn > 0x28) || (fxn & 7)))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3132  		return -ENODEV;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3133  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3134  	offset = (u32)(((0x40 | bank) << 12) | (cntr << 8) | fxn);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3135  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3136  	/* Limit the offset to the hw defined mmio region aperture */
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3137  	max_offset_lim = (u32)(((0x40 | iommu->max_banks) << 12) |
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3138  				(iommu->max_counters << 8) | 0x28);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3139  	if ((offset < MMIO_CNTR_REG_OFFSET) ||
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3140  	    (offset > max_offset_lim))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3141  		return -EINVAL;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3142  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3143  	if (is_write) {
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3144  		u64 val = *value & GENMASK_ULL(47, 0);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3145  
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3146  		writel((u32)val, iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3147  		writel((val >> 32), iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3148  	} else {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3149  		*value = readl(iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3150  		*value <<= 32;
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3151  		*value |= readl(iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3152  		*value &= GENMASK_ULL(47, 0);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3153  	}
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3154  
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3155  	return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney       2013-06-05  3156  }
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23  3157  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3158  int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23  3159  {
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3160  	if (!iommu)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3161  		return -EINVAL;
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23  3162  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3163  	return iommu_pc_get_set_reg(iommu, bank, cntr, fxn, value, false);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3164  }
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3165  EXPORT_SYMBOL(amd_iommu_pc_get_reg);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24  3166  
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3167  int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)

:::::: The code at line 3073 was first introduced by commit
:::::: f5863a00e73c432b91e4efe1d68778b4ace6a892 x86/events/amd/iommu.c: Modify functions to query max banks and counters

:::::: TO: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31625 bytes --]

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH v2 2/2] iommu/vt-d: Move Intel IOMMU driver into subdirectory
  2020-06-09 13:03   ` Joerg Roedel
@ 2020-06-10  2:09     ` Lu Baolu
  -1 siblings, 0 replies; 10+ messages in thread
From: Lu Baolu @ 2020-06-10  2:09 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: baolu.lu, David Woodhouse, Suravee Suthikulpanit,
	Jerry Snitselaar, Qian Cai, iommu, linux-kernel, Joerg Roedel

Hi Joerg,

On 6/9/20 9:03 PM, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Move all files related to the Intel IOMMU driver into its own
> subdirectory.
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu

> ---
>   MAINTAINERS                                          |  3 +--
>   drivers/iommu/Makefile                               | 12 ++++++------
>   .../iommu/{intel-iommu-debugfs.c => intel/debugfs.c} |  0
>   drivers/iommu/{ => intel}/dmar.c                     |  2 +-
>   drivers/iommu/{ => intel}/intel-pasid.h              |  0
>   drivers/iommu/{intel-iommu.c => intel/iommu.c}       |  2 +-
>   .../{intel_irq_remapping.c => intel/irq_remapping.c} |  2 +-
>   drivers/iommu/{intel-pasid.c => intel/pasid.c}       |  0
>   drivers/iommu/{intel-svm.c => intel/svm.c}           |  0
>   drivers/iommu/{intel-trace.c => intel/trace.c}       |  0
>   10 files changed, 10 insertions(+), 11 deletions(-)
>   rename drivers/iommu/{intel-iommu-debugfs.c => intel/debugfs.c} (100%)
>   rename drivers/iommu/{ => intel}/dmar.c (99%)
>   rename drivers/iommu/{ => intel}/intel-pasid.h (100%)
>   rename drivers/iommu/{intel-iommu.c => intel/iommu.c} (99%)
>   rename drivers/iommu/{intel_irq_remapping.c => intel/irq_remapping.c} (99%)
>   rename drivers/iommu/{intel-pasid.c => intel/pasid.c} (100%)
>   rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%)
>   rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c2c31d3f8ae4..fa2078dd57d3 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8716,8 +8716,7 @@ M:	Lu Baolu <baolu.lu@linux.intel.com>
>   L:	iommu@lists.linux-foundation.org
>   S:	Supported
>   T:	git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
> -F:	drivers/iommu/dmar.c
> -F:	drivers/iommu/intel*.[ch]
> +F:	drivers/iommu/intel/
>   F:	include/linux/intel-iommu.h
>   F:	include/linux/intel-svm.h
>   
> diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
> index 3af7e374b0cb..342190196dfb 100644
> --- a/drivers/iommu/Makefile
> +++ b/drivers/iommu/Makefile
> @@ -17,13 +17,13 @@ obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
>   obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
>   arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
>   obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
> -obj-$(CONFIG_DMAR_TABLE) += dmar.o
> -obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o
> -obj-$(CONFIG_INTEL_IOMMU) += intel-trace.o
> -obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel-iommu-debugfs.o
> -obj-$(CONFIG_INTEL_IOMMU_SVM) += intel-svm.o
> +obj-$(CONFIG_DMAR_TABLE) += intel/dmar.o
> +obj-$(CONFIG_INTEL_IOMMU) += intel/iommu.o intel/pasid.o
> +obj-$(CONFIG_INTEL_IOMMU) += intel/trace.o
> +obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel/debugfs.o
> +obj-$(CONFIG_INTEL_IOMMU_SVM) += intel/svm.o
>   obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
> -obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
> +obj-$(CONFIG_IRQ_REMAP) += intel/irq_remapping.o irq_remapping.o
>   obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
>   obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
>   obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
> diff --git a/drivers/iommu/intel-iommu-debugfs.c b/drivers/iommu/intel/debugfs.c
> similarity index 100%
> rename from drivers/iommu/intel-iommu-debugfs.c
> rename to drivers/iommu/intel/debugfs.c
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/intel/dmar.c
> similarity index 99%
> rename from drivers/iommu/dmar.c
> rename to drivers/iommu/intel/dmar.c
> index 60a2970c37ff..cc46dff98fa0 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/intel/dmar.c
> @@ -32,7 +32,7 @@
>   #include <asm/irq_remapping.h>
>   #include <asm/iommu_table.h>
>   
> -#include "irq_remapping.h"
> +#include "../irq_remapping.h"
>   
>   typedef int (*dmar_res_handler_t)(struct acpi_dmar_header *, void *);
>   struct dmar_res_callback {
> diff --git a/drivers/iommu/intel-pasid.h b/drivers/iommu/intel/intel-pasid.h
> similarity index 100%
> rename from drivers/iommu/intel-pasid.h
> rename to drivers/iommu/intel/intel-pasid.h
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel/iommu.c
> similarity index 99%
> rename from drivers/iommu/intel-iommu.c
> rename to drivers/iommu/intel/iommu.c
> index 648a785e078a..9129663a7406 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -47,7 +47,7 @@
>   #include <asm/iommu.h>
>   #include <trace/events/intel_iommu.h>
>   
> -#include "irq_remapping.h"
> +#include "../irq_remapping.h"
>   #include "intel-pasid.h"
>   
>   #define ROOT_SIZE		VTD_PAGE_SIZE
> diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
> similarity index 99%
> rename from drivers/iommu/intel_irq_remapping.c
> rename to drivers/iommu/intel/irq_remapping.c
> index a042f123b091..7f8769800815 100644
> --- a/drivers/iommu/intel_irq_remapping.c
> +++ b/drivers/iommu/intel/irq_remapping.c
> @@ -21,7 +21,7 @@
>   #include <asm/pci-direct.h>
>   #include <asm/msidef.h>
>   
> -#include "irq_remapping.h"
> +#include "../irq_remapping.h"
>   
>   enum irq_mode {
>   	IRQ_REMAPPING,
> diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel/pasid.c
> similarity index 100%
> rename from drivers/iommu/intel-pasid.c
> rename to drivers/iommu/intel/pasid.c
> diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel/svm.c
> similarity index 100%
> rename from drivers/iommu/intel-svm.c
> rename to drivers/iommu/intel/svm.c
> diff --git a/drivers/iommu/intel-trace.c b/drivers/iommu/intel/trace.c
> similarity index 100%
> rename from drivers/iommu/intel-trace.c
> rename to drivers/iommu/intel/trace.c
> 

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

* Re: [PATCH v2 2/2] iommu/vt-d: Move Intel IOMMU driver into subdirectory
@ 2020-06-10  2:09     ` Lu Baolu
  0 siblings, 0 replies; 10+ messages in thread
From: Lu Baolu @ 2020-06-10  2:09 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Joerg Roedel, linux-kernel, iommu, David Woodhouse

Hi Joerg,

On 6/9/20 9:03 PM, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Move all files related to the Intel IOMMU driver into its own
> subdirectory.
> 
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu

> ---
>   MAINTAINERS                                          |  3 +--
>   drivers/iommu/Makefile                               | 12 ++++++------
>   .../iommu/{intel-iommu-debugfs.c => intel/debugfs.c} |  0
>   drivers/iommu/{ => intel}/dmar.c                     |  2 +-
>   drivers/iommu/{ => intel}/intel-pasid.h              |  0
>   drivers/iommu/{intel-iommu.c => intel/iommu.c}       |  2 +-
>   .../{intel_irq_remapping.c => intel/irq_remapping.c} |  2 +-
>   drivers/iommu/{intel-pasid.c => intel/pasid.c}       |  0
>   drivers/iommu/{intel-svm.c => intel/svm.c}           |  0
>   drivers/iommu/{intel-trace.c => intel/trace.c}       |  0
>   10 files changed, 10 insertions(+), 11 deletions(-)
>   rename drivers/iommu/{intel-iommu-debugfs.c => intel/debugfs.c} (100%)
>   rename drivers/iommu/{ => intel}/dmar.c (99%)
>   rename drivers/iommu/{ => intel}/intel-pasid.h (100%)
>   rename drivers/iommu/{intel-iommu.c => intel/iommu.c} (99%)
>   rename drivers/iommu/{intel_irq_remapping.c => intel/irq_remapping.c} (99%)
>   rename drivers/iommu/{intel-pasid.c => intel/pasid.c} (100%)
>   rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%)
>   rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c2c31d3f8ae4..fa2078dd57d3 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8716,8 +8716,7 @@ M:	Lu Baolu <baolu.lu@linux.intel.com>
>   L:	iommu@lists.linux-foundation.org
>   S:	Supported
>   T:	git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
> -F:	drivers/iommu/dmar.c
> -F:	drivers/iommu/intel*.[ch]
> +F:	drivers/iommu/intel/
>   F:	include/linux/intel-iommu.h
>   F:	include/linux/intel-svm.h
>   
> diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
> index 3af7e374b0cb..342190196dfb 100644
> --- a/drivers/iommu/Makefile
> +++ b/drivers/iommu/Makefile
> @@ -17,13 +17,13 @@ obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
>   obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
>   arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
>   obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
> -obj-$(CONFIG_DMAR_TABLE) += dmar.o
> -obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o
> -obj-$(CONFIG_INTEL_IOMMU) += intel-trace.o
> -obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel-iommu-debugfs.o
> -obj-$(CONFIG_INTEL_IOMMU_SVM) += intel-svm.o
> +obj-$(CONFIG_DMAR_TABLE) += intel/dmar.o
> +obj-$(CONFIG_INTEL_IOMMU) += intel/iommu.o intel/pasid.o
> +obj-$(CONFIG_INTEL_IOMMU) += intel/trace.o
> +obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel/debugfs.o
> +obj-$(CONFIG_INTEL_IOMMU_SVM) += intel/svm.o
>   obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
> -obj-$(CONFIG_IRQ_REMAP) += intel_irq_remapping.o irq_remapping.o
> +obj-$(CONFIG_IRQ_REMAP) += intel/irq_remapping.o irq_remapping.o
>   obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
>   obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
>   obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
> diff --git a/drivers/iommu/intel-iommu-debugfs.c b/drivers/iommu/intel/debugfs.c
> similarity index 100%
> rename from drivers/iommu/intel-iommu-debugfs.c
> rename to drivers/iommu/intel/debugfs.c
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/intel/dmar.c
> similarity index 99%
> rename from drivers/iommu/dmar.c
> rename to drivers/iommu/intel/dmar.c
> index 60a2970c37ff..cc46dff98fa0 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/intel/dmar.c
> @@ -32,7 +32,7 @@
>   #include <asm/irq_remapping.h>
>   #include <asm/iommu_table.h>
>   
> -#include "irq_remapping.h"
> +#include "../irq_remapping.h"
>   
>   typedef int (*dmar_res_handler_t)(struct acpi_dmar_header *, void *);
>   struct dmar_res_callback {
> diff --git a/drivers/iommu/intel-pasid.h b/drivers/iommu/intel/intel-pasid.h
> similarity index 100%
> rename from drivers/iommu/intel-pasid.h
> rename to drivers/iommu/intel/intel-pasid.h
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel/iommu.c
> similarity index 99%
> rename from drivers/iommu/intel-iommu.c
> rename to drivers/iommu/intel/iommu.c
> index 648a785e078a..9129663a7406 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -47,7 +47,7 @@
>   #include <asm/iommu.h>
>   #include <trace/events/intel_iommu.h>
>   
> -#include "irq_remapping.h"
> +#include "../irq_remapping.h"
>   #include "intel-pasid.h"
>   
>   #define ROOT_SIZE		VTD_PAGE_SIZE
> diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
> similarity index 99%
> rename from drivers/iommu/intel_irq_remapping.c
> rename to drivers/iommu/intel/irq_remapping.c
> index a042f123b091..7f8769800815 100644
> --- a/drivers/iommu/intel_irq_remapping.c
> +++ b/drivers/iommu/intel/irq_remapping.c
> @@ -21,7 +21,7 @@
>   #include <asm/pci-direct.h>
>   #include <asm/msidef.h>
>   
> -#include "irq_remapping.h"
> +#include "../irq_remapping.h"
>   
>   enum irq_mode {
>   	IRQ_REMAPPING,
> diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel/pasid.c
> similarity index 100%
> rename from drivers/iommu/intel-pasid.c
> rename to drivers/iommu/intel/pasid.c
> diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel/svm.c
> similarity index 100%
> rename from drivers/iommu/intel-svm.c
> rename to drivers/iommu/intel/svm.c
> diff --git a/drivers/iommu/intel-trace.c b/drivers/iommu/intel/trace.c
> similarity index 100%
> rename from drivers/iommu/intel-trace.c
> rename to drivers/iommu/intel/trace.c
> 
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-06-10  2:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 13:03 [PATCH v2 0/2] iommu: Move Intel and AMD drivers into their own subdirectory Joerg Roedel
2020-06-09 13:03 ` Joerg Roedel
2020-06-09 13:03 ` [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory Joerg Roedel
2020-06-09 13:03   ` Joerg Roedel
2020-06-10  1:25   ` kernel test robot
2020-06-10  1:25     ` kernel test robot
2020-06-09 13:03 ` [PATCH v2 2/2] iommu/vt-d: Move Intel " Joerg Roedel
2020-06-09 13:03   ` Joerg Roedel
2020-06-10  2:09   ` Lu Baolu
2020-06-10  2:09     ` Lu Baolu

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.