From 403f81d8ee532c976d50a5e1051f14ec78ae8db3 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Tue, 14 Jun 2011 16:44:25 +0200 Subject: [PATCH] iommu/amd: Move missing parts to drivers/iommu A few parts of the driver were missing in drivers/iommu. Move them there to have the complete driver in that directory. Signed-off-by: Joerg Roedel --- arch/x86/kernel/Makefile | 1 - drivers/iommu/Makefile | 2 +- drivers/iommu/amd_iommu.c | 7 ++++--- {arch/x86/kernel => drivers/iommu}/amd_iommu_init.c | 8 +++++--- {arch/x86/include/asm => drivers/iommu}/amd_iommu_proto.h | 2 +- {arch/x86/include/asm => drivers/iommu}/amd_iommu_types.h | 0 .../include/asm/amd_iommu.h => include/linux/amd-iommu.h | 0 7 files changed, 11 insertions(+), 9 deletions(-) rename {arch/x86/kernel => drivers/iommu}/amd_iommu_init.c (99%) rename {arch/x86/include/asm => drivers/iommu}/amd_iommu_proto.h (98%) rename {arch/x86/include/asm => drivers/iommu}/amd_iommu_types.h (100%) rename arch/x86/include/asm/amd_iommu.h => include/linux/amd-iommu.h (100%) diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index aef02989c930..11817ff85399 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -123,7 +123,6 @@ ifeq ($(CONFIG_X86_64),y) obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o - obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o obj-y += vsmp_64.o diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 49e9c0f46bd5..4d4d77df7cac 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile @@ -1,5 +1,5 @@ obj-$(CONFIG_IOMMU_API) += iommu.o obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o -obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o +obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 7c3a95e54ec5..5aa12eaabd21 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -27,13 +27,14 @@ #include #include #include +#include #include #include #include #include -#include -#include -#include + +#include "amd_iommu_proto.h" +#include "amd_iommu_types.h" #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) diff --git a/arch/x86/kernel/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c similarity index 99% rename from arch/x86/kernel/amd_iommu_init.c rename to drivers/iommu/amd_iommu_init.c index bfc8453bd98d..82d2410f4205 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -24,14 +24,16 @@ #include #include #include +#include #include -#include -#include -#include #include #include #include #include + +#include "amd_iommu_proto.h" +#include "amd_iommu_types.h" + /* * definitions for the ACPI scanning code */ diff --git a/arch/x86/include/asm/amd_iommu_proto.h b/drivers/iommu/amd_iommu_proto.h similarity index 98% rename from arch/x86/include/asm/amd_iommu_proto.h rename to drivers/iommu/amd_iommu_proto.h index 55d95eb789b3..7ffaa64410b0 100644 --- a/arch/x86/include/asm/amd_iommu_proto.h +++ b/drivers/iommu/amd_iommu_proto.h @@ -19,7 +19,7 @@ #ifndef _ASM_X86_AMD_IOMMU_PROTO_H #define _ASM_X86_AMD_IOMMU_PROTO_H -#include +#include "amd_iommu_types.h" extern int amd_iommu_init_dma_ops(void); extern int amd_iommu_init_passthrough(void); diff --git a/arch/x86/include/asm/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h similarity index 100% rename from arch/x86/include/asm/amd_iommu_types.h rename to drivers/iommu/amd_iommu_types.h diff --git a/arch/x86/include/asm/amd_iommu.h b/include/linux/amd-iommu.h similarity index 100% rename from arch/x86/include/asm/amd_iommu.h rename to include/linux/amd-iommu.h