From 63ad62cdcad4c7bb4a4df3dfe4e6ded9db8a4de2 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Thu, 26 Jun 2008 21:28:06 +0200 Subject: [PATCH] --- yaml --- r: 99629 b: refs/heads/master c: c6da992e16a9d261eb9dfeff14e9777c3e0468c5 h: refs/heads/master i: 99627: 8a5016f99c167fe177dcc2d830cbee4ee551566e v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/amd_iommu.c | 1 + trunk/arch/x86/kernel/amd_iommu_init.c | 1 + trunk/include/asm-x86/amd_iommu.h | 32 ++++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 trunk/include/asm-x86/amd_iommu.h diff --git a/[refs] b/[refs] index ca402250ee29..393c289a852d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6631ee9d00996e7663a086b5abceba65c89ff8f6 +refs/heads/master: c6da992e16a9d261eb9dfeff14e9777c3e0468c5 diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index c282bdec1650..134dea103247 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -25,6 +25,7 @@ #include #include #include +#include #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) diff --git a/trunk/arch/x86/kernel/amd_iommu_init.c b/trunk/arch/x86/kernel/amd_iommu_init.c index ec6f13b69d53..bae4a76a3b54 100644 --- a/trunk/arch/x86/kernel/amd_iommu_init.c +++ b/trunk/arch/x86/kernel/amd_iommu_init.c @@ -23,6 +23,7 @@ #include #include #include +#include #include /* diff --git a/trunk/include/asm-x86/amd_iommu.h b/trunk/include/asm-x86/amd_iommu.h new file mode 100644 index 000000000000..30a12049353b --- /dev/null +++ b/trunk/include/asm-x86/amd_iommu.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2007-2008 Advanced Micro Devices, Inc. + * Author: Joerg Roedel + * Leo Duran + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _ASM_X86_AMD_IOMMU_H +#define _ASM_X86_AMD_IOMMU_H + +#ifdef CONFIG_AMD_IOMMU +extern int amd_iommu_init(void); +extern int amd_iommu_init_dma_ops(void); +extern void amd_iommu_detect(void); +#else +static inline int amd_iommu_init(void) { return -ENODEV; } +static inline void amd_iommu_detect(void) { } +#endif + +#endif