init.c (ef7c8f2b1fb46d3fc7a46d64bb73919e288ba547) init.c (6e2fb806e08d46cbeb96c1000ef531a92d3b2e9a)
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
3#include <linux/init.h>
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/slab.h>
7#include <linux/pci.h>
8#include <linux/interrupt.h>

--- 8 unchanged lines hidden (view full) ---

17#include <uapi/linux/idxd.h>
18#include <linux/dmaengine.h>
19#include "../dmaengine.h"
20#include "registers.h"
21#include "idxd.h"
22#include "perfmon.h"
23
24MODULE_VERSION(IDXD_DRIVER_VERSION);
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
3#include <linux/init.h>
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/slab.h>
7#include <linux/pci.h>
8#include <linux/interrupt.h>

--- 8 unchanged lines hidden (view full) ---

17#include <uapi/linux/idxd.h>
18#include <linux/dmaengine.h>
19#include "../dmaengine.h"
20#include "registers.h"
21#include "idxd.h"
22#include "perfmon.h"
23
24MODULE_VERSION(IDXD_DRIVER_VERSION);
25MODULE_DESCRIPTION("Intel Data Streaming Accelerator and In-Memory Analytics Accelerator common driver");
25MODULE_LICENSE("GPL v2");
26MODULE_AUTHOR("Intel Corporation");
27MODULE_IMPORT_NS(IDXD);
28
29static bool sva = true;
30module_param(sva, bool, 0644);
31MODULE_PARM_DESC(sva, "Toggle SVA support on/off");
32

--- 546 unchanged lines hidden (view full) ---

579 pasid = iommu_alloc_global_pasid(dev);
580 if (pasid == IOMMU_PASID_INVALID)
581 return -ENOSPC;
582
583 /*
584 * DMA domain is owned by the driver, it should support all valid
585 * types such as DMA-FQ, identity, etc.
586 */
26MODULE_LICENSE("GPL v2");
27MODULE_AUTHOR("Intel Corporation");
28MODULE_IMPORT_NS(IDXD);
29
30static bool sva = true;
31module_param(sva, bool, 0644);
32MODULE_PARM_DESC(sva, "Toggle SVA support on/off");
33

--- 546 unchanged lines hidden (view full) ---

580 pasid = iommu_alloc_global_pasid(dev);
581 if (pasid == IOMMU_PASID_INVALID)
582 return -ENOSPC;
583
584 /*
585 * DMA domain is owned by the driver, it should support all valid
586 * types such as DMA-FQ, identity, etc.
587 */
587 ret = iommu_attach_device_pasid(domain, dev, pasid, NULL);
588 ret = iommu_attach_device_pasid(domain, dev, pasid);
588 if (ret) {
589 dev_err(dev, "failed to attach device pasid %d, domain type %d",
590 pasid, domain->type);
591 iommu_free_global_pasid(pasid);
592 return ret;
593 }
594
595 /* Since we set user privilege for kernel DMA, enable completion IRQ */

--- 338 unchanged lines hidden ---
589 if (ret) {
590 dev_err(dev, "failed to attach device pasid %d, domain type %d",
591 pasid, domain->type);
592 iommu_free_global_pasid(pasid);
593 return ret;
594 }
595
596 /* Since we set user privilege for kernel DMA, enable completion IRQ */

--- 338 unchanged lines hidden ---