cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

pci-dma.c (626B)


      1// SPDX-License-Identifier: GPL-2.0
      2/*
      3 * Dynamic DMA mapping support.
      4 */
      5
      6#include <linux/types.h>
      7#include <linux/mm.h>
      8#include <linux/string.h>
      9#include <linux/pci.h>
     10#include <linux/module.h>
     11#include <linux/dmar.h>
     12#include <asm/iommu.h>
     13#include <linux/dma-mapping.h>
     14#include <linux/kernel.h>
     15#include <asm/page.h>
     16
     17int no_iommu __read_mostly;
     18#ifdef CONFIG_IOMMU_DEBUG
     19int force_iommu __read_mostly = 1;
     20#else
     21int force_iommu __read_mostly;
     22#endif
     23
     24static int __init pci_iommu_init(void)
     25{
     26	if (iommu_detected)
     27		intel_iommu_init();
     28
     29	return 0;
     30}
     31
     32/* Must execute after PCI subsystem */
     33fs_initcall(pci_iommu_init);