Displaying 20 results from an estimated 24 matches for "vr_size".
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...-git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index 5c7fdda..befc2c3 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -445,8 +445,8 @@ init_vr(struct mic_info *mic, int fd, int type,
__func__, mic->name, vr0->va, vr0->info, vr_size,
vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
mpsslog("magic 0x%x expected 0x%x\n",
- vr0->info->magic, MIC_MAGIC + type);
- assert(vr0->info->magic == MIC_MAGIC + type);
+ le32toh(vr0->info->magic), MIC_MAGIC + type);
+ assert(le32toh(vr0->info->m...
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...-git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index 5c7fdda..befc2c3 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -445,8 +445,8 @@ init_vr(struct mic_info *mic, int fd, int type,
__func__, mic->name, vr0->va, vr0->info, vr_size,
vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
mpsslog("magic 0x%x expected 0x%x\n",
- vr0->info->magic, MIC_MAGIC + type);
- assert(vr0->info->magic == MIC_MAGIC + type);
+ le32toh(vr0->info->magic), MIC_MAGIC + type);
+ assert(le32toh(vr0->info->m...
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.
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
0
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...d/mic_virtio.c
> @@ -248,17 +248,17 @@ static struct virtqueue *mic_find_vq(struct virtio_device *vdev,
> /* First assign the vring's allocated in host memory */
> vqconfig = mic_vq_config(mvdev->desc) + index;
> memcpy_fromio(&config, vqconfig, sizeof(config));
> - _vr_size = vring_size(config.num, MIC_VIRTIO_RING_ALIGN);
> + _vr_size = vring_size(le16_to_cpu(config.num), MIC_VIRTIO_RING_ALIGN);
> vr_size = PAGE_ALIGN(_vr_size + sizeof(struct _mic_vring_info));
> - va = mic_card_map(mvdev->mdev, config.address, vr_size);
> + va = mic_card_map(mvdev-&g...
2013 Sep 06
0
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
...dev_err(mic_dev(mvdev), "%s %d err %d\n",
__func__, __LINE__, -EINVAL);
return -EINVAL;
@@ -551,7 +549,7 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,
sizeof(struct _mic_vring_info));
vr->va = (void *)
__get_free_pages(GFP_KERNEL | __GFP_ZERO,
- get_order(vr_size));
+ get_order(vr_size));
if (!vr->va) {
ret = -ENOMEM;
dev_err(mic_dev(mvdev), "%s %d err %d\n",
@@ -564,8 +562,7 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,
vqconfig[i].address = mic_map_single(mdev,
vr->va, vr_size);
if (mic_map_error(vqconfig[i...
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...n ret;
> +}
> +
> +/*
> + * This initialization routine requires at least one
> + * vring i.e. vr0. vr1 is optional.
> + */
> +static void *
> +init_vr(struct mic_info *mic, int fd, int type,
> + struct mic_vring *vr0, struct mic_vring *vr1, int num_vq)
> +{
> + int vr_size;
> + char *va;
> +
> + vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES,
> + MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info));
> + va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq,
> + PROT_READ, MAP_SHARED, fd, 0);
> + if (MAP_FAILED == va) {
> + mpsslog(&...
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...n ret;
> +}
> +
> +/*
> + * This initialization routine requires at least one
> + * vring i.e. vr0. vr1 is optional.
> + */
> +static void *
> +init_vr(struct mic_info *mic, int fd, int type,
> + struct mic_vring *vr0, struct mic_vring *vr1, int num_vq)
> +{
> + int vr_size;
> + char *va;
> +
> + vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES,
> + MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info));
> + va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq,
> + PROT_READ, MAP_SHARED, fd, 0);
> + if (MAP_FAILED == va) {
> + mpsslog(&...
2013 Aug 08
0
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...unc__, __LINE__,
+ strerror(errno), ret);
+ }
+ return ret;
+}
+
+/*
+ * This initialization routine requires at least one
+ * vring i.e. vr0. vr1 is optional.
+ */
+static void *
+init_vr(struct mic_info *mic, int fd, int type,
+ struct mic_vring *vr0, struct mic_vring *vr1, int num_vq)
+{
+ int vr_size;
+ char *va;
+
+ vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES,
+ MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info));
+ va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq,
+ PROT_READ, MAP_SHARED, fd, 0);
+ if (MAP_FAILED == va) {
+ mpsslog("%s %s %d mmap failed errno %s\n&quo...
2013 Jul 29
0
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...+ dc->c2h_vdev_db = -1;
> + dc->h2c_vdev_db = -1;
> +}
> +
> +int mic_virtio_add_device(struct mic_vdev *mvdev,
> + void __user *argp)
> +{
> + struct mic_device *mdev = mvdev->mdev;
> + struct mic_device_desc *dd;
> + struct mic_vqconfig *vqconfig;
> + int vr_size, i, j, ret;
> + u8 type;
> + s8 db;
> + char irqname[10];
> + struct mic_bootparam *bootparam = mdev->dp;
> + u16 num;
> +
> + mutex_lock(&mdev->mic_mutex);
> +
> + ret = mic_copy_dp_entry(mvdev, argp, &type, &dd);
> + if (ret) {
> + mutex_unlock(...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...t;host_ack = 0;
+ dc->used_address_updated = 0;
+ dc->c2h_vdev_db = -1;
+ dc->h2c_vdev_db = -1;
+}
+
+int mic_virtio_add_device(struct mic_vdev *mvdev,
+ void __user *argp)
+{
+ struct mic_device *mdev = mvdev->mdev;
+ struct mic_device_desc *dd;
+ struct mic_vqconfig *vqconfig;
+ int vr_size, i, j, ret;
+ u8 type;
+ s8 db;
+ char irqname[10];
+ struct mic_bootparam *bootparam = mdev->dp;
+ u16 num;
+
+ mutex_lock(&mdev->mic_mutex);
+
+ ret = mic_copy_dp_entry(mvdev, argp, &type, &dd);
+ if (ret) {
+ mutex_unlock(&mdev->mic_mutex);
+ return ret;
+ }
+
+ mic_in...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...t;host_ack = 0;
+ dc->used_address_updated = 0;
+ dc->c2h_vdev_db = -1;
+ dc->h2c_vdev_db = -1;
+}
+
+int mic_virtio_add_device(struct mic_vdev *mvdev,
+ void __user *argp)
+{
+ struct mic_device *mdev = mvdev->mdev;
+ struct mic_device_desc *dd;
+ struct mic_vqconfig *vqconfig;
+ int vr_size, i, j, ret;
+ u8 type;
+ s8 db;
+ char irqname[10];
+ struct mic_bootparam *bootparam = mdev->dp;
+ u16 num;
+
+ mutex_lock(&mdev->mic_mutex);
+
+ ret = mic_copy_dp_entry(mvdev, argp, &type, &dd);
+ if (ret) {
+ mutex_unlock(&mdev->mic_mutex);
+ return ret;
+ }
+
+ mic_in...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...void (*callback)(struct virtqueue *vq),
+ const char *name)
+{
+ struct mic_vdev *mvdev = to_micvdev(vdev);
+ struct mic_vqconfig __iomem *vqconfig;
+ struct mic_vqconfig config;
+ struct virtqueue *vq;
+ void __iomem *va;
+ struct _mic_vring_info __iomem *info;
+ void *used;
+ int vr_size, _vr_size, err, magic;
+ struct vring *vr;
+ u8 type = ioread8(&mvdev->desc->type);
+
+ if (index >= ioread8(&mvdev->desc->num_vq))
+ return ERR_PTR(-ENOENT);
+
+ if (!name)
+ return ERR_PTR(-ENOENT);
+
+ /* First assign the vring's allocated in host memory */
+ vqconfi...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...void (*callback)(struct virtqueue *vq),
+ const char *name)
+{
+ struct mic_vdev *mvdev = to_micvdev(vdev);
+ struct mic_vqconfig __iomem *vqconfig;
+ struct mic_vqconfig config;
+ struct virtqueue *vq;
+ void __iomem *va;
+ struct _mic_vring_info __iomem *info;
+ void *used;
+ int vr_size, _vr_size, err, magic;
+ struct vring *vr;
+ u8 type = ioread8(&mvdev->desc->type);
+
+ if (index >= ioread8(&mvdev->desc->num_vq))
+ return ERR_PTR(-ENOENT);
+
+ if (!name)
+ return ERR_PTR(-ENOENT);
+
+ /* First assign the vring's allocated in host memory */
+ vqconfi...
2013 Aug 08
10
[PATCH v2 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v1 => v2:
a) License wording cleanup, sysfs ABI documentation, patch 1 refactoring
into 3 smaller patches and function renames, as per feedback from
Greg Kroah-Hartman.
b) Use VRINGH infrastructure for accessing virtio rings from the host
in patch 5, as per feedback from Michael S. Tsirkin.
v1: Initial post @ https://lkml.org/lkml/2013/7/24/810
Description:
2013 Aug 08
10
[PATCH v2 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v1 => v2:
a) License wording cleanup, sysfs ABI documentation, patch 1 refactoring
into 3 smaller patches and function renames, as per feedback from
Greg Kroah-Hartman.
b) Use VRINGH infrastructure for accessing virtio rings from the host
in patch 5, as per feedback from Michael S. Tsirkin.
v1: Initial post @ https://lkml.org/lkml/2013/7/24/810
Description:
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)
2013 Sep 05
16
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)