]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
radix tree test suite: Fix compilation
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 14 Jun 2020 10:07:10 +0000 (06:07 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 7 Oct 2020 13:07:49 +0000 (09:07 -0400)
Introducing local_lock broke compilation; fix it all up.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
include/linux/radix-tree.h
lib/radix-tree.c
tools/testing/radix-tree/linux/kernel.h
tools/testing/radix-tree/linux/local_lock.h [new file with mode: 0644]
tools/testing/radix-tree/test.h

index c2a9f7c90727385326ec141a5786ba40a05091ba..5c85059a92ba09e5c569c80064c518e61e826598 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/percpu.h>
 #include <linux/preempt.h>
 #include <linux/rcupdate.h>
 #include <linux/spinlock.h>
index 8e4a3a4397f2d7d2c7deae603bdff38b67ce0231..0f10485d46b61c4ceac715d25d754df0bcde597e 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/kmemleak.h>
 #include <linux/percpu.h>
-#include <linux/local_lock.h>
 #include <linux/preempt.h>             /* in_interrupt() */
 #include <linux/radix-tree.h>
 #include <linux/rcupdate.h>
index 4568248222ae7a818a726180d673159be6e6485d..39867fd80c8faa7db47dd070f7f71d99faa58dd0 100644 (file)
@@ -22,4 +22,5 @@
 #define __releases(x)
 #define __must_hold(x)
 
+#define EXPORT_PER_CPU_SYMBOL_GPL(x)
 #endif /* _KERNEL_H */
diff --git a/tools/testing/radix-tree/linux/local_lock.h b/tools/testing/radix-tree/linux/local_lock.h
new file mode 100644 (file)
index 0000000..b3cf8b2
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef _LINUX_LOCAL_LOCK
+#define _LINUX_LOCAL_LOCK
+typedef struct { } local_lock_t;
+
+static inline void local_lock(local_lock_t *lock) { }
+static inline void local_unlock(local_lock_t *lock) { }
+#define INIT_LOCAL_LOCK(x) { }
+#endif
index 34dab4d1874464a4b6ceb08e218ef35c0d1f931f..7ef7067e942c25eebacd5f3fa01f75c1d4230489 100644 (file)
@@ -56,8 +56,4 @@ int root_tag_get(struct radix_tree_root *root, unsigned int tag);
 unsigned long node_maxindex(struct radix_tree_node *);
 unsigned long shift_maxindex(unsigned int shift);
 int radix_tree_cpu_dead(unsigned int cpu);
-struct radix_tree_preload {
-       unsigned nr;
-       struct radix_tree_node *nodes;
-};
 extern struct radix_tree_preload radix_tree_preloads;