Path: blob/master/arch/x86/include/asm/amd_iommu_proto.h
10821 views
/*1* Copyright (C) 2009-2010 Advanced Micro Devices, Inc.2* Author: Joerg Roedel <[email protected]>3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 as published6* by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA16*/1718#ifndef _ASM_X86_AMD_IOMMU_PROTO_H19#define _ASM_X86_AMD_IOMMU_PROTO_H2021#include <asm/amd_iommu_types.h>2223extern int amd_iommu_init_dma_ops(void);24extern int amd_iommu_init_passthrough(void);25extern irqreturn_t amd_iommu_int_thread(int irq, void *data);26extern irqreturn_t amd_iommu_int_handler(int irq, void *data);27extern void amd_iommu_apply_erratum_63(u16 devid);28extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);29extern int amd_iommu_init_devices(void);30extern void amd_iommu_uninit_devices(void);31extern void amd_iommu_init_notifier(void);32extern void amd_iommu_init_api(void);33#ifndef CONFIG_AMD_IOMMU_STATS3435static inline void amd_iommu_stats_init(void) { }3637#endif /* !CONFIG_AMD_IOMMU_STATS */3839static inline bool is_rd890_iommu(struct pci_dev *pdev)40{41return (pdev->vendor == PCI_VENDOR_ID_ATI) &&42(pdev->device == PCI_DEVICE_ID_RD890_IOMMU);43}4445static inline bool iommu_feature(struct amd_iommu *iommu, u64 f)46{47if (!(iommu->cap & (1 << IOMMU_CAP_EFR)))48return false;4950return !!(iommu->features & f);51}5253#endif /* _ASM_X86_AMD_IOMMU_PROTO_H */545556