summaryrefslogtreecommitdiffstats
path: root/tools/testing/memblock/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/memblock/lib')
-rw-r--r--tools/testing/memblock/lib/slab.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/memblock/lib/slab.c b/tools/testing/memblock/lib/slab.c
new file mode 100644
index 000000000..6be602032
--- /dev/null
+++ b/tools/testing/memblock/lib/slab.c
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/slab.h>
+
+enum slab_state slab_state;
+
+bool slab_is_available(void)
+{
+ return slab_state >= UP;
+}