All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ptr_ring: fix build
@ 2018-03-20  0:41 ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2018-03-20  0:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jason Wang, virtualization

Fixes after recent use of kvmalloc

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tools/virtio/ringtest/ptr_ring.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 477899c..2d566fb 100644
--- 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);
-- 
MST

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ptr_ring: fix build
@ 2018-03-20  0:41 ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2018-03-20  0:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: virtualization

Fixes after recent use of kvmalloc

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tools/virtio/ringtest/ptr_ring.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 477899c..2d566fb 100644
--- 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);
-- 
MST

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptr_ring: fix build
  2018-03-20  0:41 ` Michael S. Tsirkin
  (?)
@ 2018-03-20  2:29 ` Jason Wang
  -1 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2018-03-20  2:29 UTC (permalink / raw)
  To: Michael S. Tsirkin, linux-kernel; +Cc: virtualization



On 2018年03月20日 08:41, Michael S. Tsirkin wrote:
> Fixes after recent use of kvmalloc
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/ringtest/ptr_ring.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
> index 477899c..2d566fb 100644
> --- 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);

Acked-by: Jason Wang <jasowang@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ptr_ring: fix build
  2018-03-20  0:41 ` Michael S. Tsirkin
  (?)
  (?)
@ 2018-03-20  2:29 ` Jason Wang
  -1 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2018-03-20  2:29 UTC (permalink / raw)
  To: Michael S. Tsirkin, linux-kernel; +Cc: virtualization



On 2018年03月20日 08:41, Michael S. Tsirkin wrote:
> Fixes after recent use of kvmalloc
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/ringtest/ptr_ring.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
> index 477899c..2d566fb 100644
> --- 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);

Acked-by: Jason Wang <jasowang@redhat.com>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-20  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-20  0:41 [PATCH] ptr_ring: fix build Michael S. Tsirkin
2018-03-20  0:41 ` Michael S. Tsirkin
2018-03-20  2:29 ` Jason Wang
2018-03-20  2:29 ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.