Displaying 20 results from an estimated 36 matches for "mic_virtio_ring_align".
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...ocumentation/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->magic) == MIC_MAGIC + type);
if (vr1) {
vr1->va =...
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...ocumentation/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->magic) == MIC_MAGIC + type);
if (vr1) {
vr1->va =...
2013 Nov 26
0
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...48,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->mdev, le64_to_cpu(config.address), vr_size);...
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 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...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",
> + mic->name, __func__, __LINE__,
> + strerror(errno));...
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...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",
> + mic->name, __func__, __LINE__,
> + strerror(errno));...
2013 Aug 08
0
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...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",
+ mic->name, __func__, __LINE__,
+ strerror(errno));
+ goto done;
+ }
+ *get_dp(m...
2013 Jul 29
0
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...ORK(&mvdev->virtio_bh_work, mic_bh_handler);
> +
> + for (i = 0; i < dd->num_vq; i++) {
> + struct mic_vring *vr = &mvdev->vring[i];
> + num = le16_to_cpu(vqconfig[i].num);
> + mutex_init(&mvdev->vr_mutex[i]);
> + vr_size = PAGE_ALIGN(vring_size(num, MIC_VIRTIO_RING_ALIGN) +
> + sizeof(struct _mic_vring_info));
> + vr->va = (void *)
> + __get_free_pages(GFP_KERNEL | __GFP_ZERO,
> + get_order(vr_size));
> + if (!vr->va) {
> + ret = -ENOMEM;
> + dev_err(mic_dev(mvdev), "%s %d err %d\n",
> + __func__, __LINE__, ret...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...gt;desc->num_vq))
+ return ERR_PTR(-ENOENT);
+
+ if (!name)
+ return ERR_PTR(-ENOENT);
+
+ /* 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 = PAGE_ALIGN(_vr_size + sizeof(struct _mic_vring_info));
+ va = mic_card_map(mvdev->mdev, config.address, vr_size);
+ if (!va)
+ return ERR_PTR(-ENOMEM);
+ mvdev->vr[index] = va;
+ memset_io(va, 0x0, _vr_size);
+ vq = vring_new_virtqueue(index,
+ config.num, MIC_VIRTIO_RING_AL...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...gt;desc->num_vq))
+ return ERR_PTR(-ENOENT);
+
+ if (!name)
+ return ERR_PTR(-ENOENT);
+
+ /* 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 = PAGE_ALIGN(_vr_size + sizeof(struct _mic_vring_info));
+ va = mic_card_map(mvdev->mdev, config.address, vr_size);
+ if (!va)
+ return ERR_PTR(-ENOMEM);
+ mvdev->vr[index] = va;
+ memset_io(va, 0x0, _vr_size);
+ vq = vring_new_virtqueue(index,
+ config.num, MIC_VIRTIO_RING_AL...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...= mic_vq_config(dd);
+ INIT_WORK(&mvdev->virtio_bh_work, mic_bh_handler);
+
+ for (i = 0; i < dd->num_vq; i++) {
+ struct mic_vring *vr = &mvdev->vring[i];
+ num = le16_to_cpu(vqconfig[i].num);
+ mutex_init(&mvdev->vr_mutex[i]);
+ vr_size = PAGE_ALIGN(vring_size(num, MIC_VIRTIO_RING_ALIGN) +
+ sizeof(struct _mic_vring_info));
+ vr->va = (void *)
+ __get_free_pages(GFP_KERNEL | __GFP_ZERO,
+ get_order(vr_size));
+ if (!vr->va) {
+ ret = -ENOMEM;
+ dev_err(mic_dev(mvdev), "%s %d err %d\n",
+ __func__, __LINE__, ret);
+ goto err;
+ }
+ vr->len = vr...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...= mic_vq_config(dd);
+ INIT_WORK(&mvdev->virtio_bh_work, mic_bh_handler);
+
+ for (i = 0; i < dd->num_vq; i++) {
+ struct mic_vring *vr = &mvdev->vring[i];
+ num = le16_to_cpu(vqconfig[i].num);
+ mutex_init(&mvdev->vr_mutex[i]);
+ vr_size = PAGE_ALIGN(vring_size(num, MIC_VIRTIO_RING_ALIGN) +
+ sizeof(struct _mic_vring_info));
+ vr->va = (void *)
+ __get_free_pages(GFP_KERNEL | __GFP_ZERO,
+ get_order(vr_size));
+ if (!vr->va) {
+ ret = -ENOMEM;
+ dev_err(mic_dev(mvdev), "%s %d err %d\n",
+ __func__, __LINE__, ret);
+ goto err;
+ }
+ vr->len = vr...
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 06
0
[PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
...size));
ret = -ENOMEM;
dev_err(mic_dev(mvdev), "%s %d err %d\n",
__func__, __LINE__, ret);
@@ -573,8 +570,7 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,
}
vqconfig[i].address = cpu_to_le64(vqconfig[i].address);
- vring_init(&vr->vr, num,
- vr->va, MIC_VIRTIO_RING_ALIGN);
+ vring_init(&vr->vr, num, vr->va, MIC_VIRTIO_RING_ALIGN);
ret = vringh_init_kern(&mvr->vrh,
*(u32 *)mic_vq_features(mvdev->dd), num, false,
vr->vr.desc, vr->vr.avail, vr->vr.used);
@@ -593,8 +589,8 @@ int mic_virtio_add_device(struct mic_vdev *mvdev,...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...--- a/drivers/misc/mic/vop/vop_main.c
+++ b/drivers/misc/mic/vop/vop_main.c
@@ -281,7 +281,7 @@ static struct virtqueue *vop_new_virtqueue(unsigned int index,
void *used)
{
bool weak_barriers = false;
- struct vring vring;
+ struct vring_s vring;
vring_init(&vring, num, pages, MIC_VIRTIO_RING_ALIGN);
vring.used = used;
diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index 5739a9669b29..eddbb1a0c742 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -287,7 +287,7 @@ static irqreturn_t mlxbf_...
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
...--- a/drivers/misc/mic/vop/vop_main.c
+++ b/drivers/misc/mic/vop/vop_main.c
@@ -281,7 +281,7 @@ static struct virtqueue *vop_new_virtqueue(unsigned int index,
void *used)
{
bool weak_barriers = false;
- struct vring vring;
+ struct vring_s vring;
vring_init(&vring, num, pages, MIC_VIRTIO_RING_ALIGN);
vring.used = used;
diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index 5739a9669b29..eddbb1a0c742 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -287,7 +287,7 @@ static irqreturn_t mlxbf_...