All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tools/virtio: fix compilation
@ 2021-07-06 14:26 Eugenio Pérez
  2021-07-06 14:26 ` [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h Eugenio Pérez
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eugenio Pérez @ 2021-07-06 14:26 UTC (permalink / raw)
  To: mst, linux-kernel
  Cc: Matthew Wilcox, Jason Wang, Stefano Garzarella, Yunsheng Lin

Virtio testing tools cannot build. Fixing.

Comments are welcome, specially in case I missed use of stub lockdep.h.

I couldn't try some of the tools, that already did not compile on 5.13:
gpio, liblockdep, selftests, bpf, tracing.

Eugenio Pérez (2):
  tools: Remove lockdep.h and its include from spinlock.h
  vringh: Include spinlock.h

 include/linux/vringh.h                   |  1 +
 tools/include/linux/spinlock.h           |  2 --
 tools/testing/radix-tree/linux/lockdep.h | 11 -----------
 3 files changed, 1 insertion(+), 13 deletions(-)
 delete mode 100644 tools/testing/radix-tree/linux/lockdep.h

-- 
2.27.0



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

* [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h
  2021-07-06 14:26 [PATCH 0/2] tools/virtio: fix compilation Eugenio Pérez
@ 2021-07-06 14:26 ` Eugenio Pérez
  2021-07-06 14:32   ` Matthew Wilcox
  2021-07-06 14:26 ` [PATCH 2/2] vringh: Include spinlock.h Eugenio Pérez
  2021-07-07  3:18 ` [PATCH 0/2] tools/virtio: fix compilation Yunsheng Lin
  2 siblings, 1 reply; 6+ messages in thread
From: Eugenio Pérez @ 2021-07-06 14:26 UTC (permalink / raw)
  To: mst, linux-kernel
  Cc: Matthew Wilcox, Jason Wang, Stefano Garzarella, Yunsheng Lin

Commit 58d6ea3085f2 ("xarray: Add XArray unconditional store
operations") adds this file at the same time that xarray and xarray
tests. However, xarray tests and other tools/ works with no problem
without this file.

The motivation for the deletion is that vhost tests/tools need to use
spinlock.h mock file, but at the moment it includes lockdep.h that is
only available under tools/testing/radix-tree.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 tools/include/linux/spinlock.h           |  2 --
 tools/testing/radix-tree/linux/lockdep.h | 11 -----------
 2 files changed, 13 deletions(-)
 delete mode 100644 tools/testing/radix-tree/linux/lockdep.h

diff --git a/tools/include/linux/spinlock.h b/tools/include/linux/spinlock.h
index c934572d935c..622266b197d0 100644
--- a/tools/include/linux/spinlock.h
+++ b/tools/include/linux/spinlock.h
@@ -37,6 +37,4 @@ static inline bool arch_spin_is_locked(arch_spinlock_t *mutex)
 	return true;
 }
 
-#include <linux/lockdep.h>
-
 #endif
diff --git a/tools/testing/radix-tree/linux/lockdep.h b/tools/testing/radix-tree/linux/lockdep.h
deleted file mode 100644
index 565fccdfe6e9..000000000000
--- a/tools/testing/radix-tree/linux/lockdep.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _LINUX_LOCKDEP_H
-#define _LINUX_LOCKDEP_H
-struct lock_class_key {
-	unsigned int a;
-};
-
-static inline void lockdep_set_class(spinlock_t *lock,
-					struct lock_class_key *key)
-{
-}
-#endif /* _LINUX_LOCKDEP_H */
-- 
2.27.0


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

* [PATCH 2/2] vringh: Include spinlock.h
  2021-07-06 14:26 [PATCH 0/2] tools/virtio: fix compilation Eugenio Pérez
  2021-07-06 14:26 ` [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h Eugenio Pérez
@ 2021-07-06 14:26 ` Eugenio Pérez
  2021-07-06 14:44   ` Stefano Garzarella
  2021-07-07  3:18 ` [PATCH 0/2] tools/virtio: fix compilation Yunsheng Lin
  2 siblings, 1 reply; 6+ messages in thread
From: Eugenio Pérez @ 2021-07-06 14:26 UTC (permalink / raw)
  To: mst, linux-kernel
  Cc: Matthew Wilcox, Jason Wang, Stefano Garzarella, Yunsheng Lin

Commit f53d9910d009 ("vringh: add 'iotlb_lock' to synchronize iotlb
accesses") introduces this dependency, but does not include spinlock.h.
While kernel seems to compile as usual, tools/virtio cannot do the
same.

Fixes: f53d9910d009 ("vringh: add 'iotlb_lock' to synchronize iotlb accesses")

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 include/linux/vringh.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/vringh.h b/include/linux/vringh.h
index 84db7b8f912f..212892cf9822 100644
--- a/include/linux/vringh.h
+++ b/include/linux/vringh.h
@@ -14,6 +14,7 @@
 #include <linux/virtio_byteorder.h>
 #include <linux/uio.h>
 #include <linux/slab.h>
+#include <linux/spinlock.h>
 #if IS_REACHABLE(CONFIG_VHOST_IOTLB)
 #include <linux/dma-direction.h>
 #include <linux/vhost_iotlb.h>
-- 
2.27.0


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

* Re: [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h
  2021-07-06 14:26 ` [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h Eugenio Pérez
@ 2021-07-06 14:32   ` Matthew Wilcox
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Wilcox @ 2021-07-06 14:32 UTC (permalink / raw)
  To: Eugenio Pérez
  Cc: mst, linux-kernel, Jason Wang, Stefano Garzarella, Yunsheng Lin

On Tue, Jul 06, 2021 at 04:26:31PM +0200, Eugenio Pérez wrote:
> Commit 58d6ea3085f2 ("xarray: Add XArray unconditional store
> operations") adds this file at the same time that xarray and xarray
> tests. However, xarray tests and other tools/ works with no problem
> without this file.
> 
> The motivation for the deletion is that vhost tests/tools need to use
> spinlock.h mock file, but at the moment it includes lockdep.h that is
> only available under tools/testing/radix-tree.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

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

* Re: [PATCH 2/2] vringh: Include spinlock.h
  2021-07-06 14:26 ` [PATCH 2/2] vringh: Include spinlock.h Eugenio Pérez
@ 2021-07-06 14:44   ` Stefano Garzarella
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Garzarella @ 2021-07-06 14:44 UTC (permalink / raw)
  To: Eugenio Pérez
  Cc: mst, linux-kernel, Matthew Wilcox, Jason Wang, Yunsheng Lin

On Tue, Jul 06, 2021 at 04:26:32PM +0200, Eugenio Pérez wrote:
>Commit f53d9910d009 ("vringh: add 'iotlb_lock' to synchronize iotlb
>accesses") introduces this dependency, but does not include spinlock.h.
>While kernel seems to compile as usual, tools/virtio cannot do the
>same.
>
>Fixes: f53d9910d009 ("vringh: add 'iotlb_lock' to synchronize iotlb accesses")
>
>Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
>---
> include/linux/vringh.h | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/include/linux/vringh.h b/include/linux/vringh.h
>index 84db7b8f912f..212892cf9822 100644
>--- a/include/linux/vringh.h
>+++ b/include/linux/vringh.h
>@@ -14,6 +14,7 @@
> #include <linux/virtio_byteorder.h>
> #include <linux/uio.h>
> #include <linux/slab.h>
>+#include <linux/spinlock.h>
> #if IS_REACHABLE(CONFIG_VHOST_IOTLB)
> #include <linux/dma-direction.h>
> #include <linux/vhost_iotlb.h>
>-- 
>2.27.0
>

Ooops, thanks for fixing this!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>


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

* Re: [PATCH 0/2] tools/virtio: fix compilation
  2021-07-06 14:26 [PATCH 0/2] tools/virtio: fix compilation Eugenio Pérez
  2021-07-06 14:26 ` [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h Eugenio Pérez
  2021-07-06 14:26 ` [PATCH 2/2] vringh: Include spinlock.h Eugenio Pérez
@ 2021-07-07  3:18 ` Yunsheng Lin
  2 siblings, 0 replies; 6+ messages in thread
From: Yunsheng Lin @ 2021-07-07  3:18 UTC (permalink / raw)
  To: Eugenio Pérez, mst, linux-kernel
  Cc: Matthew Wilcox, Jason Wang, Stefano Garzarella

On 2021/7/6 22:26, Eugenio Pérez wrote:
> Virtio testing tools cannot build. Fixing.
> 
> 
> 
> Comments are welcome, specially in case I missed use of stub lockdep.h.
> 
> 
> 
> I couldn't try some of the tools, that already did not compile on 5.13:
> 
> gpio, liblockdep, selftests, bpf, tracing.

This patchset fixes the compilation error explicitly.
My previous refactor patchset seems to fixes the compilation error
accidentally too.

Anyway it seems better to fix the compilation error explicitly.

> 
> 
> 
> Eugenio Pérez (2):
> 
>   tools: Remove lockdep.h and its include from spinlock.h
> 
>   vringh: Include spinlock.h
> 
> 
> 
>  include/linux/vringh.h                   |  1 +
> 
>  tools/include/linux/spinlock.h           |  2 --
> 
>  tools/testing/radix-tree/linux/lockdep.h | 11 -----------
> 
>  3 files changed, 1 insertion(+), 13 deletions(-)
> 
>  delete mode 100644 tools/testing/radix-tree/linux/lockdep.h
> 
> 
> 

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

end of thread, other threads:[~2021-07-07  3:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 14:26 [PATCH 0/2] tools/virtio: fix compilation Eugenio Pérez
2021-07-06 14:26 ` [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h Eugenio Pérez
2021-07-06 14:32   ` Matthew Wilcox
2021-07-06 14:26 ` [PATCH 2/2] vringh: Include spinlock.h Eugenio Pérez
2021-07-06 14:44   ` Stefano Garzarella
2021-07-07  3:18 ` [PATCH 0/2] tools/virtio: fix compilation Yunsheng Lin

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.