Commit 7b626acb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'core-iommu-for-linus' of...

Merge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (63 commits)
  x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree
  x86/amd-iommu: Remove amd_iommu_pd_table
  x86/amd-iommu: Move reset_iommu_command_buffer out of locked code
  x86/amd-iommu: Cleanup DTE flushing code
  x86/amd-iommu: Introduce iommu_flush_device() function
  x86/amd-iommu: Cleanup attach/detach_device code
  x86/amd-iommu: Keep devices per domain in a list
  x86/amd-iommu: Add device bind reference counting
  x86/amd-iommu: Use dev->arch->iommu to store iommu related information
  x86/amd-iommu: Remove support for domain sharing
  x86/amd-iommu: Rearrange dma_ops related functions
  x86/amd-iommu: Move some pte allocation functions in the right section
  x86/amd-iommu: Remove iommu parameter from dma_ops_domain_alloc
  x86/amd-iommu: Use get_device_id and check_device where appropriate
  x86/amd-iommu: Move find_protection_domain to helper functions
  x86/amd-iommu: Simplify get_device_resources()
  x86/amd-iommu: Let domain_for_device handle aliases
  x86/amd-iommu: Remove iommu specific handling from dma_ops path
  x86/amd-iommu: Remove iommu parameter from __(un)map_single
  x86/amd-iommu: Make alloc_new_range aware of multiple IOMMUs
  ...
parents 1ebb275a 4528752f
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -4,8 +4,6 @@
#include <linux/dma-mapping.h>
#include <linux/dma-mapping.h>
#include <linux/swiotlb.h>
#include <linux/swiotlb.h>


extern int swiotlb_force;

#ifdef CONFIG_SWIOTLB
#ifdef CONFIG_SWIOTLB
extern int swiotlb;
extern int swiotlb;
extern void pci_swiotlb_init(void);
extern void pci_swiotlb_init(void);
+2 −2
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@ struct dma_map_ops swiotlb_dma_ops = {
void __init swiotlb_dma_init(void)
void __init swiotlb_dma_init(void)
{
{
	dma_ops = &swiotlb_dma_ops;
	dma_ops = &swiotlb_dma_ops;
	swiotlb_init();
	swiotlb_init(1);
}
}


void __init pci_swiotlb_init(void)
void __init pci_swiotlb_init(void)
@@ -51,7 +51,7 @@ void __init pci_swiotlb_init(void)
		swiotlb = 1;
		swiotlb = 1;
		printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
		printk(KERN_INFO "PCI-DMA: Re-initialize machine vector.\n");
		machvec_init("dig");
		machvec_init("dig");
		swiotlb_init();
		swiotlb_init(1);
		dma_ops = &swiotlb_dma_ops;
		dma_ops = &swiotlb_dma_ops;
#else
#else
		panic("Unable to find Intel IOMMU");
		panic("Unable to find Intel IOMMU");
+1 −1
Original line number Original line Diff line number Diff line
@@ -345,7 +345,7 @@ void __init setup_arch(char **cmdline_p)


#ifdef CONFIG_SWIOTLB
#ifdef CONFIG_SWIOTLB
	if (ppc_swiotlb_enable)
	if (ppc_swiotlb_enable)
		swiotlb_init();
		swiotlb_init(1);
#endif
#endif


	paging_init();
	paging_init();
+1 −1
Original line number Original line Diff line number Diff line
@@ -550,7 +550,7 @@ void __init setup_arch(char **cmdline_p)


#ifdef CONFIG_SWIOTLB
#ifdef CONFIG_SWIOTLB
	if (ppc_swiotlb_enable)
	if (ppc_swiotlb_enable)
		swiotlb_init();
		swiotlb_init(1);
#endif
#endif


	paging_init();
	paging_init();
+5 −11
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
 * Copyright (C) 2007-2009 Advanced Micro Devices, Inc.
 * Author: Joerg Roedel <joerg.roedel@amd.com>
 * Author: Joerg Roedel <joerg.roedel@amd.com>
 *         Leo Duran <leo.duran@amd.com>
 *         Leo Duran <leo.duran@amd.com>
 *
 *
@@ -23,19 +23,13 @@
#include <linux/irqreturn.h>
#include <linux/irqreturn.h>


#ifdef CONFIG_AMD_IOMMU
#ifdef CONFIG_AMD_IOMMU
extern int amd_iommu_init(void);

extern int amd_iommu_init_dma_ops(void);
extern int amd_iommu_init_passthrough(void);
extern void amd_iommu_detect(void);
extern void amd_iommu_detect(void);
extern irqreturn_t amd_iommu_int_handler(int irq, void *data);

extern void amd_iommu_flush_all_domains(void);
extern void amd_iommu_flush_all_devices(void);
extern void amd_iommu_shutdown(void);
extern void amd_iommu_apply_erratum_63(u16 devid);
#else
#else
static inline int amd_iommu_init(void) { return -ENODEV; }

static inline void amd_iommu_detect(void) { }
static inline void amd_iommu_detect(void) { }
static inline void amd_iommu_shutdown(void) { }

#endif
#endif


#endif /* _ASM_X86_AMD_IOMMU_H */
#endif /* _ASM_X86_AMD_IOMMU_H */
Loading