Merge branch 'iommu-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu into core/iommu
This commit is contained in:
35
include/linux/amd-iommu.h
Normal file
35
include/linux/amd-iommu.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2007-2010 Advanced Micro Devices, Inc.
|
||||
* Author: Joerg Roedel <joerg.roedel@amd.com>
|
||||
* Leo Duran <leo.duran@amd.com>
|
||||
*
|
||||
* 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
|
||||
|
||||
#include <linux/irqreturn.h>
|
||||
|
||||
#ifdef CONFIG_AMD_IOMMU
|
||||
|
||||
extern int amd_iommu_detect(void);
|
||||
|
||||
#else
|
||||
|
||||
static inline int amd_iommu_detect(void) { return -ENODEV; }
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_X86_AMD_IOMMU_H */
|
@@ -19,6 +19,8 @@
|
||||
#ifndef __LINUX_IOMMU_H
|
||||
#define __LINUX_IOMMU_H
|
||||
|
||||
#include <linux/errno.h>
|
||||
|
||||
#define IOMMU_READ (1)
|
||||
#define IOMMU_WRITE (2)
|
||||
#define IOMMU_CACHE (4) /* DMA cache coherency */
|
||||
|
@@ -1589,5 +1589,16 @@ int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt);
|
||||
int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
|
||||
unsigned int len, const char *kw);
|
||||
|
||||
/**
|
||||
* pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
|
||||
* @pdev: the PCI device
|
||||
*
|
||||
* if the device is PCIE, return NULL
|
||||
* if the device isn't connected to a PCIe bridge (that is its parent is a
|
||||
* legacy PCI bridge and the bridge is directly connected to bus 0), return its
|
||||
* parent
|
||||
*/
|
||||
struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* LINUX_PCI_H */
|
||||
|
Reference in New Issue
Block a user