All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tools/virtio: add dma barrier stubs
@ 2018-07-25 13:45 Michael S. Tsirkin
  2018-07-25 13:45 ` [PATCH 2/2] tools/virtio: add kmalloc_array stub Michael S. Tsirkin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2018-07-25 13:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: khandual, Jason Wang, virtualization

Fixes: 55e49dc43a8 ("virtio_ring: switch to dma_XX barriers for rpmsg")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tools/virtio/asm/barrier.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
index 0ac3caf90877..d0351f83aebe 100644
--- a/tools/virtio/asm/barrier.h
+++ b/tools/virtio/asm/barrier.h
@@ -13,8 +13,8 @@
 } while (0);
 /* Weak barriers should be used. If not - it's a bug */
 # define mb() abort()
-# define rmb() abort()
-# define wmb() abort()
+# define dma_rmb() abort()
+# define dma_wmb() abort()
 #else
 #error Please fill in barrier macros
 #endif
-- 
MST


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

* [PATCH 2/2] tools/virtio: add kmalloc_array stub
  2018-07-25 13:45 [PATCH 1/2] tools/virtio: add dma barrier stubs Michael S. Tsirkin
  2018-07-25 13:45 ` [PATCH 2/2] tools/virtio: add kmalloc_array stub Michael S. Tsirkin
@ 2018-07-25 13:45 ` Michael S. Tsirkin
  2018-07-30  7:28   ` Jason Wang
  2018-07-30  7:28   ` Jason Wang
  2018-07-30  7:28   ` Jason Wang
  2 siblings, 2 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2018-07-25 13:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: khandual, Jason Wang, virtualization

Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tools/virtio/linux/kernel.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index fca8381bbe04..fb22bccfbc8a 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
 		return __kmalloc_fake;
 	return malloc(s);
 }
+static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
+{
+	return kmalloc(n * s, gfp);
+}
+
 static inline void *kzalloc(size_t s, gfp_t gfp)
 {
 	void *p = kmalloc(s, gfp);
-- 
MST


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

* [PATCH 2/2] tools/virtio: add kmalloc_array stub
  2018-07-25 13:45 [PATCH 1/2] tools/virtio: add dma barrier stubs Michael S. Tsirkin
@ 2018-07-25 13:45 ` Michael S. Tsirkin
  2018-07-25 13:45 ` Michael S. Tsirkin
  2018-07-30  7:28   ` Jason Wang
  2 siblings, 0 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2018-07-25 13:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: virtualization, khandual

Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tools/virtio/linux/kernel.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
index fca8381bbe04..fb22bccfbc8a 100644
--- a/tools/virtio/linux/kernel.h
+++ b/tools/virtio/linux/kernel.h
@@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
 		return __kmalloc_fake;
 	return malloc(s);
 }
+static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
+{
+	return kmalloc(n * s, gfp);
+}
+
 static inline void *kzalloc(size_t s, gfp_t gfp)
 {
 	void *p = kmalloc(s, gfp);
-- 
MST

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

* Re: [PATCH 1/2] tools/virtio: add dma barrier stubs
  2018-07-25 13:45 [PATCH 1/2] tools/virtio: add dma barrier stubs Michael S. Tsirkin
@ 2018-07-30  7:28   ` Jason Wang
  2018-07-25 13:45 ` Michael S. Tsirkin
  2018-07-30  7:28   ` Jason Wang
  2 siblings, 0 replies; 7+ messages in thread
From: Jason Wang @ 2018-07-30  7:28 UTC (permalink / raw)
  To: Michael S. Tsirkin, linux-kernel; +Cc: khandual, virtualization



On 2018年07月25日 21:45, Michael S. Tsirkin wrote:
> Fixes: 55e49dc43a8 ("virtio_ring: switch to dma_XX barriers for rpmsg")
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/asm/barrier.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
> index 0ac3caf90877..d0351f83aebe 100644
> --- a/tools/virtio/asm/barrier.h
> +++ b/tools/virtio/asm/barrier.h
> @@ -13,8 +13,8 @@
>   } while (0);
>   /* Weak barriers should be used. If not - it's a bug */
>   # define mb() abort()
> -# define rmb() abort()
> -# define wmb() abort()
> +# define dma_rmb() abort()
> +# define dma_wmb() abort()
>   #else
>   #error Please fill in barrier macros
>   #endif

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

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

* Re: [PATCH 1/2] tools/virtio: add dma barrier stubs
@ 2018-07-30  7:28   ` Jason Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Wang @ 2018-07-30  7:28 UTC (permalink / raw)
  To: Michael S. Tsirkin, linux-kernel; +Cc: virtualization, khandual



On 2018年07月25日 21:45, Michael S. Tsirkin wrote:
> Fixes: 55e49dc43a8 ("virtio_ring: switch to dma_XX barriers for rpmsg")
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/asm/barrier.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/virtio/asm/barrier.h b/tools/virtio/asm/barrier.h
> index 0ac3caf90877..d0351f83aebe 100644
> --- a/tools/virtio/asm/barrier.h
> +++ b/tools/virtio/asm/barrier.h
> @@ -13,8 +13,8 @@
>   } while (0);
>   /* Weak barriers should be used. If not - it's a bug */
>   # define mb() abort()
> -# define rmb() abort()
> -# define wmb() abort()
> +# define dma_rmb() abort()
> +# define dma_wmb() abort()
>   #else
>   #error Please fill in barrier macros
>   #endif

Reviewed-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] 7+ messages in thread

* Re: [PATCH 2/2] tools/virtio: add kmalloc_array stub
  2018-07-25 13:45 ` Michael S. Tsirkin
  2018-07-30  7:28   ` Jason Wang
@ 2018-07-30  7:28   ` Jason Wang
  1 sibling, 0 replies; 7+ messages in thread
From: Jason Wang @ 2018-07-30  7:28 UTC (permalink / raw)
  To: Michael S. Tsirkin, linux-kernel; +Cc: khandual, virtualization



On 2018年07月25日 21:45, Michael S. Tsirkin wrote:
> Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()")
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/linux/kernel.h | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
> index fca8381bbe04..fb22bccfbc8a 100644
> --- a/tools/virtio/linux/kernel.h
> +++ b/tools/virtio/linux/kernel.h
> @@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
>   		return __kmalloc_fake;
>   	return malloc(s);
>   }
> +static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
> +{
> +	return kmalloc(n * s, gfp);
> +}
> +
>   static inline void *kzalloc(size_t s, gfp_t gfp)
>   {
>   	void *p = kmalloc(s, gfp);

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

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

* Re: [PATCH 2/2] tools/virtio: add kmalloc_array stub
  2018-07-25 13:45 ` Michael S. Tsirkin
@ 2018-07-30  7:28   ` Jason Wang
  2018-07-30  7:28   ` Jason Wang
  1 sibling, 0 replies; 7+ messages in thread
From: Jason Wang @ 2018-07-30  7:28 UTC (permalink / raw)
  To: Michael S. Tsirkin, linux-kernel; +Cc: virtualization, khandual



On 2018年07月25日 21:45, Michael S. Tsirkin wrote:
> Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()")
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   tools/virtio/linux/kernel.h | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
> index fca8381bbe04..fb22bccfbc8a 100644
> --- a/tools/virtio/linux/kernel.h
> +++ b/tools/virtio/linux/kernel.h
> @@ -52,6 +52,11 @@ static inline void *kmalloc(size_t s, gfp_t gfp)
>   		return __kmalloc_fake;
>   	return malloc(s);
>   }
> +static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
> +{
> +	return kmalloc(n * s, gfp);
> +}
> +
>   static inline void *kzalloc(size_t s, gfp_t gfp)
>   {
>   	void *p = kmalloc(s, gfp);

Reviewed-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] 7+ messages in thread

end of thread, other threads:[~2018-07-30  7:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 13:45 [PATCH 1/2] tools/virtio: add dma barrier stubs Michael S. Tsirkin
2018-07-25 13:45 ` [PATCH 2/2] tools/virtio: add kmalloc_array stub Michael S. Tsirkin
2018-07-25 13:45 ` Michael S. Tsirkin
2018-07-30  7:28   ` Jason Wang
2018-07-30  7:28   ` Jason Wang
2018-07-30  7:28 ` [PATCH 1/2] tools/virtio: add dma barrier stubs Jason Wang
2018-07-30  7:28   ` 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.