aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mic
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2015-09-29 21:14:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 07:54:54 -0400
commitf4a66c20448257fbb8932827e5f766b74d1acbf0 (patch)
tree71f995817bb204f780c5eba69b893460034ec08b /drivers/misc/mic
parentd411e79391092925457d89b77d7cd3038ba6d04b (diff)
misc: mic: Update MIC host daemon with COSM changes
This patch updates the MIC host daemon to work with corresponding changes in COSM. Other MIC daemon fixes, cleanups and enhancements as are also rolled into this patch. Changes to MIC sysfs ABI which go into effect with this patch are also documented. Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic')
-rw-r--r--drivers/misc/mic/Makefile4
-rw-r--r--drivers/misc/mic/bus/scif_bus.c7
-rw-r--r--drivers/misc/mic/bus/scif_bus.h6
3 files changed, 12 insertions, 5 deletions
diff --git a/drivers/misc/mic/Makefile b/drivers/misc/mic/Makefile
index a2e75f46fe4e..e288a1106738 100644
--- a/drivers/misc/mic/Makefile
+++ b/drivers/misc/mic/Makefile
@@ -2,5 +2,9 @@
2# Makefile - Intel MIC Linux driver. 2# Makefile - Intel MIC Linux driver.
3# Copyright(c) 2013, Intel Corporation. 3# Copyright(c) 2013, Intel Corporation.
4# 4#
5obj-$(CONFIG_INTEL_MIC_HOST) += host/
6obj-$(CONFIG_INTEL_MIC_CARD) += card/
5obj-y += bus/ 7obj-y += bus/
6obj-$(CONFIG_SCIF) += scif/ 8obj-$(CONFIG_SCIF) += scif/
9obj-$(CONFIG_MIC_COSM) += cosm/
10obj-$(CONFIG_MIC_COSM) += cosm_client/
diff --git a/drivers/misc/mic/bus/scif_bus.c b/drivers/misc/mic/bus/scif_bus.c
index 2da7ceed015d..fd2702143022 100644
--- a/drivers/misc/mic/bus/scif_bus.c
+++ b/drivers/misc/mic/bus/scif_bus.c
@@ -28,7 +28,6 @@ static ssize_t device_show(struct device *d,
28 28
29 return sprintf(buf, "0x%04x\n", dev->id.device); 29 return sprintf(buf, "0x%04x\n", dev->id.device);
30} 30}
31
32static DEVICE_ATTR_RO(device); 31static DEVICE_ATTR_RO(device);
33 32
34static ssize_t vendor_show(struct device *d, 33static ssize_t vendor_show(struct device *d,
@@ -38,7 +37,6 @@ static ssize_t vendor_show(struct device *d,
38 37
39 return sprintf(buf, "0x%04x\n", dev->id.vendor); 38 return sprintf(buf, "0x%04x\n", dev->id.vendor);
40} 39}
41
42static DEVICE_ATTR_RO(vendor); 40static DEVICE_ATTR_RO(vendor);
43 41
44static ssize_t modalias_show(struct device *d, 42static ssize_t modalias_show(struct device *d,
@@ -49,7 +47,6 @@ static ssize_t modalias_show(struct device *d,
49 return sprintf(buf, "scif:d%08Xv%08X\n", 47 return sprintf(buf, "scif:d%08Xv%08X\n",
50 dev->id.device, dev->id.vendor); 48 dev->id.device, dev->id.vendor);
51} 49}
52
53static DEVICE_ATTR_RO(modalias); 50static DEVICE_ATTR_RO(modalias);
54 51
55static struct attribute *scif_dev_attrs[] = { 52static struct attribute *scif_dev_attrs[] = {
@@ -144,7 +141,8 @@ struct scif_hw_dev *
144scif_register_device(struct device *pdev, int id, struct dma_map_ops *dma_ops, 141scif_register_device(struct device *pdev, int id, struct dma_map_ops *dma_ops,
145 struct scif_hw_ops *hw_ops, u8 dnode, u8 snode, 142 struct scif_hw_ops *hw_ops, u8 dnode, u8 snode,
146 struct mic_mw *mmio, struct mic_mw *aper, void *dp, 143 struct mic_mw *mmio, struct mic_mw *aper, void *dp,
147 void __iomem *rdp, struct dma_chan **chan, int num_chan) 144 void __iomem *rdp, struct dma_chan **chan, int num_chan,
145 bool card_rel_da)
148{ 146{
149 int ret; 147 int ret;
150 struct scif_hw_dev *sdev; 148 struct scif_hw_dev *sdev;
@@ -171,6 +169,7 @@ scif_register_device(struct device *pdev, int id, struct dma_map_ops *dma_ops,
171 dma_set_mask(&sdev->dev, DMA_BIT_MASK(64)); 169 dma_set_mask(&sdev->dev, DMA_BIT_MASK(64));
172 sdev->dma_ch = chan; 170 sdev->dma_ch = chan;
173 sdev->num_dma_ch = num_chan; 171 sdev->num_dma_ch = num_chan;
172 sdev->card_rel_da = card_rel_da;
174 dev_set_name(&sdev->dev, "scif-dev%u", sdev->dnode); 173 dev_set_name(&sdev->dev, "scif-dev%u", sdev->dnode);
175 /* 174 /*
176 * device_register() causes the bus infrastructure to look for a 175 * device_register() causes the bus infrastructure to look for a
diff --git a/drivers/misc/mic/bus/scif_bus.h b/drivers/misc/mic/bus/scif_bus.h
index 335a228a8236..94f29ac608b6 100644
--- a/drivers/misc/mic/bus/scif_bus.h
+++ b/drivers/misc/mic/bus/scif_bus.h
@@ -46,6 +46,8 @@ struct scif_hw_dev_id {
46 * @rdp - Remote device page 46 * @rdp - Remote device page
47 * @dma_ch - Array of DMA channels 47 * @dma_ch - Array of DMA channels
48 * @num_dma_ch - Number of DMA channels available 48 * @num_dma_ch - Number of DMA channels available
49 * @card_rel_da - Set to true if DMA addresses programmed in the DMA engine
50 * are relative to the card point of view
49 */ 51 */
50struct scif_hw_dev { 52struct scif_hw_dev {
51 struct scif_hw_ops *hw_ops; 53 struct scif_hw_ops *hw_ops;
@@ -59,6 +61,7 @@ struct scif_hw_dev {
59 void __iomem *rdp; 61 void __iomem *rdp;
60 struct dma_chan **dma_ch; 62 struct dma_chan **dma_ch;
61 int num_dma_ch; 63 int num_dma_ch;
64 bool card_rel_da;
62}; 65};
63 66
64/** 67/**
@@ -114,7 +117,8 @@ scif_register_device(struct device *pdev, int id,
114 struct scif_hw_ops *hw_ops, u8 dnode, u8 snode, 117 struct scif_hw_ops *hw_ops, u8 dnode, u8 snode,
115 struct mic_mw *mmio, struct mic_mw *aper, 118 struct mic_mw *mmio, struct mic_mw *aper,
116 void *dp, void __iomem *rdp, 119 void *dp, void __iomem *rdp,
117 struct dma_chan **chan, int num_chan); 120 struct dma_chan **chan, int num_chan,
121 bool card_rel_da);
118void scif_unregister_device(struct scif_hw_dev *sdev); 122void scif_unregister_device(struct scif_hw_dev *sdev);
119 123
120static inline struct scif_hw_dev *dev_to_scif(struct device *dev) 124static inline struct scif_hw_dev *dev_to_scif(struct device *dev)