search for: mic_device_desc

Displaying 20 results from an estimated 62 matches for "mic_device_desc".

2013 Nov 26
0
[PATCH char-misc-linus 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
...+++++++++----------------- 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c index befc2c3..4d17487 100644 --- a/Documentation/mic/mpssd/mpssd.c +++ b/Documentation/mic/mpssd/mpssd.c @@ -313,7 +313,7 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type) int i; void *dp = get_dp(mic, type); - for (i = mic_aligned_size(struct mic_bootparam); i < PAGE_SIZE; + for (i = sizeof(struct mic_bootparam); i < PAGE_SIZE; i += mic_total_desc_size(d)) { d = dp + i; @@ -520,7 +520,7 @@ static v...
2013 Nov 26
0
[PATCH char-misc-linus v2 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
...+++++++++----------------- 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c index befc2c3..4d17487 100644 --- a/Documentation/mic/mpssd/mpssd.c +++ b/Documentation/mic/mpssd/mpssd.c @@ -313,7 +313,7 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type) int i; void *dp = get_dp(mic, type); - for (i = mic_aligned_size(struct mic_bootparam); i < PAGE_SIZE; + for (i = sizeof(struct mic_bootparam); i < PAGE_SIZE; i += mic_total_desc_size(d)) { d = dp + i; @@ -520,7 +520,7 @@ static v...
2013 Nov 26
0
[PATCH char-misc-linus v2 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
...+++++++++----------------- 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c index befc2c3..4d17487 100644 --- a/Documentation/mic/mpssd/mpssd.c +++ b/Documentation/mic/mpssd/mpssd.c @@ -313,7 +313,7 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type) int i; void *dp = get_dp(mic, type); - for (i = mic_aligned_size(struct mic_bootparam); i < PAGE_SIZE; + for (i = sizeof(struct mic_bootparam); i < PAGE_SIZE; i += mic_total_desc_size(d)) { d = dp + i; @@ -520,7 +520,7 @@ static v...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...+#include <linux/sched.h> +#include <linux/wait.h> +#include <linux/io.h> +#include "mic_common.h" +#include "mic_virtio.h" + +#define VIRTIO_SUBCODE_64 0x0D00 + +#define MIC_MAX_VRINGS 4 + +struct mic_vdev { + struct virtio_device vdev; + struct mic_device_desc __iomem *desc; + struct mic_device_ctrl __iomem *dc; + struct mic_device *mdev; + void __iomem *vr[MIC_MAX_VRINGS]; + int used_size[MIC_MAX_VRINGS]; + struct completion reset_done; + struct mic_irq *virtio_cookie; + int c2h_vdev_db; +}; + +static struct mic_irq *virtio_config_cookie; +#define to_mi...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...+#include <linux/sched.h> +#include <linux/wait.h> +#include <linux/io.h> +#include "mic_common.h" +#include "mic_virtio.h" + +#define VIRTIO_SUBCODE_64 0x0D00 + +#define MIC_MAX_VRINGS 4 + +struct mic_vdev { + struct virtio_device vdev; + struct mic_device_desc __iomem *desc; + struct mic_device_ctrl __iomem *dc; + struct mic_device *mdev; + void __iomem *vr[MIC_MAX_VRINGS]; + int used_size[MIC_MAX_VRINGS]; + struct completion reset_done; + struct mic_irq *virtio_cookie; + int c2h_vdev_db; +}; + +static struct mic_irq *virtio_config_cookie; +#define to_mi...
2017 Dec 20
0
[PATCH v4 3/4] virtio_vop: don't kfree device on register failure
...an empty one to avoid getting a warning from core. - */ + struct virtio_device *vdev = + container_of(_d, struct virtio_device, dev); + struct _vop_vdev *vop_vdev = + container_of(vdev, struct _vop_vdev, vdev); + + kfree(vop_vdev); } /* @@ -466,7 +468,7 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, unsigned int offset, struct vop_device *vpdev, int dnode) { - struct _vop_vdev *vdev; + struct _vop_vdev *vdev, *reg_dev = NULL; int ret; u8 type = ioread8(&d->type); @@ -497,6 +499,7 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, vdev-&gt...
2017 Dec 21
0
[PATCH v5 3/4] virtio_vop: don't kfree device on register failure
...an empty one to avoid getting a warning from core. - */ + struct virtio_device *vdev = + container_of(_d, struct virtio_device, dev); + struct _vop_vdev *vop_vdev = + container_of(vdev, struct _vop_vdev, vdev); + + kfree(vop_vdev); } /* @@ -466,7 +468,7 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, unsigned int offset, struct vop_device *vpdev, int dnode) { - struct _vop_vdev *vdev; + struct _vop_vdev *vdev, *reg_dev = NULL; int ret; u8 type = ioread8(&d->type); @@ -497,6 +499,7 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, vdev-&gt...
2017 Dec 12
1
[PATCH 2/3] virtio: use put_device instead of kfree
...- */ > + struct virtio_device *vdev = > + container_of(_d, struct virtio_device, dev); > + struct _vop_vdev *vop_vdev = > + container_of(vdev, struct _vop_vdev, vdev); > + > + kfree(vop_vdev); > } > > /* > @@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, > dev_err(_vop_dev(vdev), > "Failed to register vop device %u type %u\n", > offset, type); > - goto free_irq; > + vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev); > + put_device(&vdev->vdev.dev); > + return ret; &gt...
2017 Dec 12
1
[PATCH 2/3] virtio: use put_device instead of kfree
...- */ > + struct virtio_device *vdev = > + container_of(_d, struct virtio_device, dev); > + struct _vop_vdev *vop_vdev = > + container_of(vdev, struct _vop_vdev, vdev); > + > + kfree(vop_vdev); > } > > /* > @@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, > dev_err(_vop_dev(vdev), > "Failed to register vop device %u type %u\n", > offset, type); > - goto free_irq; > + vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev); > + put_device(&vdev->vdev.dev); > + return ret; &gt...
2013 Nov 27
7
[PATCH char-misc-linus v3 0/6] misc: mic: Fixes for 3.13-final
These patches fix various issues which were reported or found with the MIC driver. Changelog ========= v2 => v3: * Reorder patch 5 in v2 to patch 4 in v3. * Split patch 4 in v2 into patches 5 and 6 in v3. v1 => v2: @ https://lkml.org/lkml/2013/11/26/376 * Address review comments @ https://lkml.org/lkml/2013/11/26/443 in patch 5. v1: Initial post @ https://lkml.org/lkml/2013/11/26/321
2013 Nov 27
7
[PATCH char-misc-linus v3 0/6] misc: mic: Fixes for 3.13-final
These patches fix various issues which were reported or found with the MIC driver. Changelog ========= v2 => v3: * Reorder patch 5 in v2 to patch 4 in v3. * Split patch 4 in v2 into patches 5 and 6 in v3. v1 => v2: @ https://lkml.org/lkml/2013/11/26/376 * Address review comments @ https://lkml.org/lkml/2013/11/26/443 in patch 5. v1: Initial post @ https://lkml.org/lkml/2013/11/26/321
2013 Nov 26
7
[PATCH char-misc-linus 0/5] misc: mic: Fixes for 3.13-rc2
These patches fix various issues which were reported or found with the MIC driver. Ashutosh Dixit (3): misc: mic: Bug fix for sysfs poll usage. misc: mic: Fix sparse warnings and other endianness issues. misc: mic: Fix user space namespace pollution from mic_common.h. Sudeep Dutt (2): misc: mic: Change mic_notify(...) to return true. misc: mic: Minor bug fix in 'retry' loops.
2013 Nov 26
7
[PATCH char-misc-linus 0/5] misc: mic: Fixes for 3.13-rc2
These patches fix various issues which were reported or found with the MIC driver. Ashutosh Dixit (3): misc: mic: Bug fix for sysfs poll usage. misc: mic: Fix sparse warnings and other endianness issues. misc: mic: Fix user space namespace pollution from mic_common.h. Sudeep Dutt (2): misc: mic: Change mic_notify(...) to return true. misc: mic: Minor bug fix in 'retry' loops.
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi, The main change is split device_register into 2 sperate calls: device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device. v3->v4: * split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device. v2->v3: * virtio: add new helper do get
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi, The main change is split device_register into 2 sperate calls: device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device. v3->v4: * split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device. v2->v3: * virtio: add new helper do get
2013 Jul 29
0
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...virtio.h" > > /* Debugfs parent dir */ > static struct dentry *mic_dbg; > @@ -207,7 +208,13 @@ static const struct file_operations post_code_ops = { > static int dp_seq_show(struct seq_file *s, void *pos) > { > struct mic_device *mdev = s->private; > + struct mic_device_desc *d; > + struct mic_device_ctrl *dc; > + struct mic_vqconfig *vqconfig; > + __u32 *features; > + __u8 *config; > struct mic_bootparam *bootparam = mdev->dp; > + int i, j; > > seq_printf(s, "Bootparam: magic 0x%x\n", > bootparam->magic); > @@ -22...
2017 Dec 12
0
[PATCH v2 2/3] virtio: use put_device instead of kfree
...an empty one to avoid getting a warning from core. - */ + struct virtio_device *vdev = + container_of(_d, struct virtio_device, dev); + struct _vop_vdev *vop_vdev = + container_of(vdev, struct _vop_vdev, vdev); + + kfree(vop_vdev); } /* @@ -501,7 +503,9 @@ static int _vop_add_device(struct mic_device_desc __iomem *d, dev_err(_vop_dev(vdev), "Failed to register vop device %u type %u\n", offset, type); - goto free_irq; + vpdev->hw_ops->free_irq(vpdev, vdev->virtio_cookie, vdev); + put_device(&vdev->vdev.dev); + return ret; } writeq((u64)vdev, &vdev->...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...mic_debugfs.h" +#include "mic_virtio.h" /* Debugfs parent dir */ static struct dentry *mic_dbg; @@ -207,7 +208,13 @@ static const struct file_operations post_code_ops = { static int dp_seq_show(struct seq_file *s, void *pos) { struct mic_device *mdev = s->private; + struct mic_device_desc *d; + struct mic_device_ctrl *dc; + struct mic_vqconfig *vqconfig; + __u32 *features; + __u8 *config; struct mic_bootparam *bootparam = mdev->dp; + int i, j; seq_printf(s, "Bootparam: magic 0x%x\n", bootparam->magic); @@ -222,6 +229,53 @@ static int dp_seq_show(struct seq_f...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...mic_debugfs.h" +#include "mic_virtio.h" /* Debugfs parent dir */ static struct dentry *mic_dbg; @@ -207,7 +208,13 @@ static const struct file_operations post_code_ops = { static int dp_seq_show(struct seq_file *s, void *pos) { struct mic_device *mdev = s->private; + struct mic_device_desc *d; + struct mic_device_ctrl *dc; + struct mic_vqconfig *vqconfig; + __u32 *features; + __u8 *config; struct mic_bootparam *bootparam = mdev->dp; + int i, j; seq_printf(s, "Bootparam: magic 0x%x\n", bootparam->magic); @@ -222,6 +229,53 @@ static int dp_seq_show(struct seq_f...
2017 Dec 11
6
[PATCH 0/3] fix cleanup for fail to register_virtio_device
This series fix the cleanup for the caller of register_virtio_device, the main work is use put_device instead of kfree. weiping zhang (3): virtio_pci: use put_device instead of kfree virtio: use put_device instead of kfree virtio: put reference count of virtio_device.dev drivers/misc/mic/vop/vop_main.c | 16 +++++++++------- drivers/remoteproc/remoteproc_virtio.c | 2 +-