projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c8efd6
)
ptr_ring: fix build
author
Michael S. Tsirkin
<mst@redhat.com>
Tue, 20 Mar 2018 00:41:04 +0000
(
02:41
+0200)
committer
Michael S. Tsirkin
<mst@redhat.com>
Tue, 20 Mar 2018 01:17:37 +0000
(
03:17
+0200)
Fixes after recent use of kvmalloc
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tools/virtio/ringtest/ptr_ring.c
patch
|
blob
|
history
diff --git
a/tools/virtio/ringtest/ptr_ring.c
b/tools/virtio/ringtest/ptr_ring.c
index 477899c12c5138d8c5d334946eb6fd17af56e09c..2d566fbd236bed5d3f7d600e7d4bde628f2df8ae 100644
(file)
--- a/
tools/virtio/ringtest/ptr_ring.c
+++ b/
tools/virtio/ringtest/ptr_ring.c
@@
-17,6
+17,8
@@
#define likely(x) (__builtin_expect(!!(x), 1))
#define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a))
#define SIZE_MAX (~(size_t)0)
+#define KMALLOC_MAX_SIZE SIZE_MAX
+#define BUG_ON(x) assert(x)
typedef pthread_spinlock_t spinlock_t;
@@
-57,6
+59,9
@@
static void kfree(void *p)
free(p);
}
+#define kvmalloc_array kmalloc_array
+#define kvfree kfree
+
static void spin_lock_init(spinlock_t *lock)
{
int r = pthread_spin_init(lock, 0);