diff options
Diffstat (limited to 'arch/ia64/mm/init.c')
-rw-r--r-- | arch/ia64/mm/init.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index aae75fd7b810..678b98a09c85 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -9,6 +9,7 @@ #include <linux/init.h> #include <linux/dma-noncoherent.h> +#include <linux/dmar.h> #include <linux/efi.h> #include <linux/elf.h> #include <linux/memblock.h> @@ -23,10 +24,10 @@ #include <linux/proc_fs.h> #include <linux/bitops.h> #include <linux/kexec.h> +#include <linux/swiotlb.h> #include <asm/dma.h> #include <asm/io.h> -#include <asm/machvec.h> #include <asm/numa.h> #include <asm/patch.h> #include <asm/pgalloc.h> @@ -67,7 +68,6 @@ __ia64_sync_icache_dcache (pte_t pte) set_bit(PG_arch_1, &page->flags); /* mark page as clean */ } -#ifdef CONFIG_SWIOTLB /* * Since DMA is i-cache coherent, any (complete) pages that were written via * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to @@ -82,7 +82,6 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr, set_bit(PG_arch_1, &pfn_to_page(pfn)->flags); } while (++pfn <= PHYS_PFN(paddr + size - 1)); } -#endif inline void ia64_set_rbs_bot (void) @@ -632,13 +631,17 @@ mem_init (void) BUG_ON(PTRS_PER_PMD * sizeof(pmd_t) != PAGE_SIZE); BUG_ON(PTRS_PER_PTE * sizeof(pte_t) != PAGE_SIZE); -#ifdef CONFIG_PCI /* - * This needs to be called _after_ the command line has been parsed but _before_ - * any drivers that may need the PCI DMA interface are initialized or bootmem has - * been freed. + * This needs to be called _after_ the command line has been parsed but + * _before_ any drivers that may need the PCI DMA interface are + * initialized or bootmem has been freed. */ - platform_dma_init(); +#ifdef CONFIG_INTEL_IOMMU + detect_intel_iommu(); + if (!iommu_detected) +#endif +#ifdef CONFIG_SWIOTLB + swiotlb_init(1); #endif #ifdef CONFIG_FLATMEM |