misc: mic: Remove COSM functionality from the MIC host driver
Since COSM functionality is now moved into a separate COSM driver drivers, this patch removes this functionality from the base MIC host driver. The MIC host driver now implements cosm_hw_ops and registers a COSM device which allows the COSM driver to trigger boot/shutdown/reset of the MIC devices via the cosm_hw_ops. Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> 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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7cb46d9bff
commit
1da2b3eeef
@@ -23,7 +23,6 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/mic_common.h>
|
||||
|
||||
#include "../common/mic_dev.h"
|
||||
#include "mic_device.h"
|
||||
#include "mic_smpt.h"
|
||||
@@ -62,7 +61,7 @@ static int mic_sync_dma(struct mic_device *mdev, dma_addr_t dst,
|
||||
}
|
||||
error:
|
||||
if (err)
|
||||
dev_err(mdev->sdev->parent, "%s %d err %d\n",
|
||||
dev_err(&mdev->pdev->dev, "%s %d err %d\n",
|
||||
__func__, __LINE__, err);
|
||||
return err;
|
||||
}
|
||||
@@ -440,7 +439,7 @@ void mic_virtio_reset_devices(struct mic_device *mdev)
|
||||
struct list_head *pos, *tmp;
|
||||
struct mic_vdev *mvdev;
|
||||
|
||||
dev_dbg(mdev->sdev->parent, "%s\n", __func__);
|
||||
dev_dbg(&mdev->pdev->dev, "%s\n", __func__);
|
||||
|
||||
list_for_each_safe(pos, tmp, &mdev->vdev_list) {
|
||||
mvdev = list_entry(pos, struct mic_vdev, list);
|
||||
@@ -686,7 +685,7 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,
|
||||
mvr->head = USHRT_MAX;
|
||||
mvr->mvdev = mvdev;
|
||||
mvr->vrh.notify = mic_notify;
|
||||
dev_dbg(mdev->sdev->parent,
|
||||
dev_dbg(&mdev->pdev->dev,
|
||||
"%s %d index %d va %p info %p vr_size 0x%x\n",
|
||||
__func__, __LINE__, i, vr->va, vr->info, vr_size);
|
||||
mvr->buf = (void *)__get_free_pages(GFP_KERNEL,
|
||||
@@ -704,7 +703,7 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,
|
||||
mvdev->virtio_db, MIC_INTR_DB);
|
||||
if (IS_ERR(mvdev->virtio_cookie)) {
|
||||
ret = PTR_ERR(mvdev->virtio_cookie);
|
||||
dev_dbg(mdev->sdev->parent, "request irq failed\n");
|
||||
dev_dbg(&mdev->pdev->dev, "request irq failed\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -720,7 +719,7 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,
|
||||
smp_wmb();
|
||||
dd->type = type;
|
||||
|
||||
dev_dbg(mdev->sdev->parent, "Added virtio device id %d\n", dd->type);
|
||||
dev_dbg(&mdev->pdev->dev, "Added virtio device id %d\n", dd->type);
|
||||
|
||||
db = bootparam->h2c_config_db;
|
||||
if (db != -1)
|
||||
@@ -755,7 +754,7 @@ void mic_virtio_del_device(struct mic_vdev *mvdev)
|
||||
db = bootparam->h2c_config_db;
|
||||
if (db == -1)
|
||||
goto skip_hot_remove;
|
||||
dev_dbg(mdev->sdev->parent,
|
||||
dev_dbg(&mdev->pdev->dev,
|
||||
"Requesting hot remove id %d\n", mvdev->virtio_id);
|
||||
mvdev->dc->config_change = MIC_VIRTIO_PARAM_DEV_REMOVE;
|
||||
mdev->ops->send_intr(mdev, db);
|
||||
@@ -765,7 +764,7 @@ void mic_virtio_del_device(struct mic_vdev *mvdev)
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
dev_dbg(mdev->sdev->parent,
|
||||
dev_dbg(&mdev->pdev->dev,
|
||||
"Device id %d config_change %d guest_ack %d retry %d\n",
|
||||
mvdev->virtio_id, mvdev->dc->config_change,
|
||||
mvdev->dc->guest_ack, retry);
|
||||
@@ -794,7 +793,7 @@ skip_hot_remove:
|
||||
tmp_mvdev = list_entry(pos, struct mic_vdev, list);
|
||||
if (tmp_mvdev == mvdev) {
|
||||
list_del(pos);
|
||||
dev_dbg(mdev->sdev->parent,
|
||||
dev_dbg(&mdev->pdev->dev,
|
||||
"Removing virtio device id %d\n",
|
||||
mvdev->virtio_id);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user