From patchwork Wed Jun 22 10:16:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 904272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5MAGkcH025192 for ; Wed, 22 Jun 2011 10:16:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756158Ab1FVKQP (ORCPT ); Wed, 22 Jun 2011 06:16:15 -0400 Received: from tx2ehsobe004.messaging.microsoft.com ([65.55.88.14]:5082 "EHLO TX2EHSOBE009.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754197Ab1FVKQN (ORCPT ); Wed, 22 Jun 2011 06:16:13 -0400 Received: from mail155-tx2-R.bigfish.com (10.9.14.252) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 14.1.225.22; Wed, 22 Jun 2011 10:16:12 +0000 Received: from mail155-tx2 (localhost.localdomain [127.0.0.1]) by mail155-tx2-R.bigfish.com (Postfix) with ESMTP id 77CF23E015A; Wed, 22 Jun 2011 10:16:12 +0000 (UTC) X-SpamScore: 1 X-BigFish: VPS1(zzzz1202hzz8275bhz32i668h43h61h) X-Spam-TCS-SCL: 0:0 Received: from mail155-tx2 (localhost.localdomain [127.0.0.1]) by mail155-tx2 (MessageSwitch) id 1308737771918717_12455; Wed, 22 Jun 2011 10:16:11 +0000 (UTC) Received: from TX2EHSMHS019.bigfish.com (unknown [10.9.14.241]) by mail155-tx2.bigfish.com (Postfix) with ESMTP id D9D30C48054; Wed, 22 Jun 2011 10:16:11 +0000 (UTC) Received: from ausb3twp01.amd.com (163.181.249.108) by TX2EHSMHS019.bigfish.com (10.9.99.119) with Microsoft SMTP Server id 14.1.225.22; Wed, 22 Jun 2011 10:16:11 +0000 X-WSS-ID: 0LN6SIX-01-8QX-02 X-M-MSG: Received: from sausexedgep01.amd.com (sausexedgep01-ext.amd.com [163.181.249.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp01.amd.com (Axway MailGate 3.8.1) with ESMTP id 290A710283DB; Wed, 22 Jun 2011 05:16:09 -0500 (CDT) Received: from sausexhtp02.amd.com (163.181.3.152) by sausexedgep01.amd.com (163.181.36.54) with Microsoft SMTP Server (TLS) id 8.3.106.1; Wed, 22 Jun 2011 05:16:56 -0500 Received: from storexhtp01.amd.com (172.24.4.3) by sausexhtp02.amd.com (163.181.3.152) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 22 Jun 2011 05:16:10 -0500 Received: from gwo.osrc.amd.com (165.204.16.204) by storexhtp01.amd.com (172.24.4.3) with Microsoft SMTP Server id 8.3.83.0; Wed, 22 Jun 2011 06:16:08 -0400 Received: from lemmy.osrc.amd.com (lemmy.osrc.amd.com [165.204.15.93]) by gwo.osrc.amd.com (Postfix) with ESMTP id 4169E49C5E9; Wed, 22 Jun 2011 11:16:08 +0100 (BST) Received: by lemmy.osrc.amd.com (Postfix, from userid 1000) id CA454100187; Wed, 22 Jun 2011 12:16:48 +0200 (CEST) From: Joerg Roedel To: Ohad Ben-Cohen CC: , , , , , , , , Joerg Roedel Subject: [PATCH 2/2] iommu/amd: Move missing parts to drivers/iommu Date: Wed, 22 Jun 2011 12:16:46 +0200 Message-ID: <1308737806-2658-3-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308737806-2658-1-git-send-email-joerg.roedel@amd.com> References: <1307742947-32118-1-git-send-email-ohad@wizery.com> <1308737806-2658-1-git-send-email-joerg.roedel@amd.com> MIME-Version: 1.0 X-OriginatorOrg: amd.com Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Jun 2011 10:16:47 +0000 (UTC) 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 ++++--- .../x86/kernel => drivers/iommu}/amd_iommu_init.c | 8 +++++--- .../asm => drivers/iommu}/amd_iommu_proto.h | 2 +- .../asm => drivers/iommu}/amd_iommu_types.h | 0 .../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/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 diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index aef0298..11817ff 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 49e9c0f..4d4d77d 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 7c3a95e..5aa12ea 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 bfc8453..82d2410 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 55d95eb..7ffaa64 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);