MLK-24937-2 misc: mic: add the correct dependencies and fix build errors for COSM/SCIF modules

Since the interaction between imx_mic host driver and userspace depends
on the COSM module. And COSM module depends on SCIF module, so add the
correct dependencies here. Also remove the dependencies between X86 and
COSM/SCIF module, so we can reuse them.

Fix some errors when build SCIF/COSM module on ARM64 platform, because
some codes relay on X86 head file.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
Sherry Sun 2020-10-29 18:43:48 +08:00
parent 7d2f72ec41
commit 36c9b7a808
4 changed files with 13 additions and 7 deletions

View File

@ -22,7 +22,7 @@ comment "SCIF Bus Driver"
config SCIF_BUS
tristate "SCIF Bus Driver"
depends on 64BIT && PCI && X86
depends on 64BIT && PCI
help
This option is selected by any driver which registers a
device or driver on the SCIF Bus, such as CONFIG_INTEL_MIC_HOST
@ -95,7 +95,7 @@ comment "IMX MIC Host Driver"
config IMX_MIC_HOST
tristate "IMX MIC HOST Driver"
depends on ARM64 && PCI && CMA
depends on VOP_BUS && MIC_COSM
depends on VOP_BUS && SCIF_BUS && MIC_COSM
help
Enable MIC host for i.MX plaforms, actually it is a virtnet over PCIe
based on VOP framework.
@ -108,7 +108,7 @@ comment "IMX MIC Card Driver"
config IMX_MIC_CARD
tristate "IMX MIC Card Driver"
depends on ARM64
depends on VOP_BUS
depends on VOP_BUS && SCIF_BUS && MIC_COSM
select VIRTIO
help
Enable MIC card for i.MX plaforms, actually it is a virtnet over PCIe
@ -121,7 +121,7 @@ comment "SCIF Driver"
config SCIF
tristate "SCIF Driver"
depends on 64BIT && PCI && X86 && SCIF_BUS && IOMMU_SUPPORT
depends on 64BIT && PCI && SCIF_BUS && IOMMU_SUPPORT
select IOMMU_IOVA
help
This enables SCIF Driver support for the Intel Many Integrated
@ -141,7 +141,7 @@ comment "Intel MIC Coprocessor State Management (COSM) Drivers"
config MIC_COSM
tristate "Intel MIC Coprocessor State Management (COSM) Drivers"
depends on 64BIT && PCI && X86 && SCIF
depends on 64BIT && PCI && SCIF
help
This enables COSM driver support for the Intel Many
Integrated Core (MIC) family of PCIe form factor coprocessor

View File

@ -12,6 +12,10 @@
#include <linux/io.h>
#include "cosm_main.h"
#ifndef __START_KERNEL_map
#define __START_KERNEL_map 0
#endif
/* Debugfs parent dir */
static struct dentry *cosm_dbg;

View File

@ -6,7 +6,6 @@
*
* Intel SCIF driver.
*/
#include <linux/intel-iommu.h>
#include <linux/pagemap.h>
#include <linux/sched/mm.h>
#include <linux/sched/signal.h>

View File

@ -53,7 +53,6 @@
#ifndef SCIF_RMA_H
#define SCIF_RMA_H
#include <linux/intel-iommu.h>
#include <linux/mmu_notifier.h>
#include "../bus/scif_bus.h"
@ -72,6 +71,10 @@
#define SCIF_DMA_64BIT_PFN SCIF_IOVA_PFN(DMA_BIT_MASK(64))
#define SCIF_DMA_63BIT_PFN SCIF_IOVA_PFN(DMA_BIT_MASK(63))
#ifndef intel_iommu_enabled
#define intel_iommu_enabled 0
#endif
/*
* struct scif_endpt_rma_info - Per Endpoint Remote Memory Access Information
*