aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mic/host/mic_device.h
diff options
context:
space:
mode:
authorDasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>2013-09-05 16:41:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 13:50:56 -0700
commita01e28f692088e9789ebb0c374fdac83de59899b (patch)
treeb422484ed67ac5c42111bfc117d7f71b2770c295 /drivers/misc/mic/host/mic_device.h
parentIntel MIC Host Driver for X100 family. (diff)
downloadlinux-dev-a01e28f692088e9789ebb0c374fdac83de59899b.tar.xz
linux-dev-a01e28f692088e9789ebb0c374fdac83de59899b.zip
Intel MIC Host Driver Interrupt/SMPT support.
This patch enables the following features: a) MSIx, MSI and legacy interrupt support. b) System Memory Page Table(SMPT) support. SMPT enables system memory access from the card. On X100 devices the host can program 32 SMPT registers each capable of accessing 16GB of system memory address space from X100 devices. The registers can thereby be used to access a cumulative 512GB of system memory address space from X100 devices at any point in time. Co-author: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Caz Yokoyama <Caz.Yokoyama@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Harshavardhan R Kharche <harshavardhan.r.kharche@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Acked-by: Yaozu (Eddie) Dong <eddie.dong@intel.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic/host/mic_device.h')
-rw-r--r--drivers/misc/mic/host/mic_device.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/misc/mic/host/mic_device.h b/drivers/misc/mic/host/mic_device.h
index 6cd904cdfdf9..dd34b6532a01 100644
--- a/drivers/misc/mic/host/mic_device.h
+++ b/drivers/misc/mic/host/mic_device.h
@@ -21,6 +21,10 @@
#ifndef _MIC_DEVICE_H_
#define _MIC_DEVICE_H_
+#include <linux/idr.h>
+
+#include "mic_intr.h"
+
/* The maximum number of MIC devices supported in a single host system. */
#define MIC_MAX_NUM_DEVS 256
@@ -53,6 +57,12 @@ enum mic_stepping {
* @stepping: Stepping ID.
* @attr_group: Pointer to list of sysfs attribute groups.
* @sdev: Device for sysfs entries.
+ * @mic_mutex: Mutex for synchronizing access to mic_device.
+ * @intr_ops: HW specific interrupt operations.
+ * @smpt_ops: Hardware specific SMPT operations.
+ * @smpt: MIC SMPT information.
+ * @intr_info: H/W specific interrupt information.
+ * @irq_info: The OS specific irq information
*/
struct mic_device {
struct mic_mw mmio;
@@ -63,6 +73,12 @@ struct mic_device {
enum mic_stepping stepping;
const struct attribute_group **attr_group;
struct device *sdev;
+ struct mutex mic_mutex;
+ struct mic_hw_intr_ops *intr_ops;
+ struct mic_smpt_ops *smpt_ops;
+ struct mic_smpt_info *smpt;
+ struct mic_intr_info *intr_info;
+ struct mic_irq_info irq_info;
};
/**
@@ -71,12 +87,17 @@ struct mic_device {
* @mmio_bar: MMIO bar resource number.
* @read_spad: Read from scratch pad register.
* @write_spad: Write to scratch pad register.
+ * @send_intr: Send an interrupt for a particular doorbell on the card.
+ * @ack_interrupt: Hardware specific operations to ack the h/w on
+ * receipt of an interrupt.
*/
struct mic_hw_ops {
u8 aper_bar;
u8 mmio_bar;
u32 (*read_spad)(struct mic_device *mdev, unsigned int idx);
void (*write_spad)(struct mic_device *mdev, unsigned int idx, u32 val);
+ void (*send_intr)(struct mic_device *mdev, int doorbell);
+ u32 (*ack_interrupt)(struct mic_device *mdev);
};
/**