tools/virtio: fix compilation
Subsystems (2)
Eugenio Pérez
maintainercover tools/virtio: fix compilation
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
Signature · 1 line
2.27.0
Eugenio Pérez
maintainerPATCH 1/2 tools: Remove lockdep.h and its include from spinlock.h
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.
--- 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
tools/include/linux/spinlock.h +0 -2
@@ -37,6 +37,4 @@ static inline bool arch_spin_is_locked(arch_spinlock_t *mutex) return true; } -#include <linux/lockdep.h> -#endif
tools/testing/radix-tree/linux/lockdep.h deleted +0 -11
@@ -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 */
Signature · 1 line
2.27.0
Re: [PATCH 1/2] tools: Remove lockdep.h and its include from spinlock.h
Quoted 10 lines · Eugenio Pérez
Commit
58d6ea3085f2("xarray: Add XArray unconditional store operations") adds this file at the same time that xarray and xarray tests. However, xarray tests and othertools/works with no problem without this file.The motivation for the deletion is that vhost tests/tools need to use
spinlock.hmock file, but at the moment it includeslockdep.hthat is only available undertools/testing/radix-tree.Signed-off-by Eugenio Pérez <[email protected]>
Eugenio Pérez
maintainerPATCH 2/2 vringh: Include spinlock.h
In reply to Eugenio PérezCommit 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.
--- include/linux/vringh.h | 1 + 1 file changed, 1 insertion(+)
include/linux/vringh.h +1 -0
@@ -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>
Signature · 1 line
2.27.0
Re: [PATCH 2/2] vringh: Include spinlock.h
Quoted 27 lines · Eugenio Pérez
Commit
f53d9910d009("vringh: add 'iotlb_lock' to synchronize iotlb accesses") introduces this dependency, but does not includespinlock.h. While kernel seems to compile as usual,tools/virtiocannot do the same.Fixes f53d9910d009 ("vringh: add 'iotlb_lock' to synchronize iotlb accesses")Signed-off-by Eugenio Pérez <[email protected]>---
include/linux/vringh.h| 1 +1 file changed, 1 insertion(+)include/linux/vringh.h +1
-0@@ -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> Signature · 1 line
2.27.0
Ooops, thanks for fixing this!
Quoted 11 lines · Eugenio Pérez
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.
Quoted 23 lines
Eugenio Pérez (2):
tools: Remove
lockdep.hand its include fromspinlock.hvringh: Include
spinlock.hinclude/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