]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tools: fix compilation after gfp_types.h split
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 2 Sep 2022 19:19:23 +0000 (20:19 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 11 Sep 2022 23:22:31 +0000 (16:22 -0700)
When gfp_types.h was split from gfp.h, it broke the radix test suite.  Fix
the test suite by using gfp_types.h in the tools gfp.h header.

Link: https://lkml.kernel.org/r/20220902191923.1735933-1-willy@infradead.org
Fixes: 49b00bd528ee (headers/deps: mm: Split <linux/gfp_types.h> out of <linux/gfp.h>)
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/include/linux/gfp.h
tools/include/linux/gfp_types.h [new file with mode: 0644]

index b238dbc9eb858675f701456da7cf6e1f52365197..6a10ff5f5be9070cce7130e62f723e4ecb0a1994 100644 (file)
@@ -3,26 +3,7 @@
 #define _TOOLS_INCLUDE_LINUX_GFP_H
 
 #include <linux/types.h>
-
-#define __GFP_BITS_SHIFT 26
-#define __GFP_BITS_MASK ((gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
-
-#define __GFP_HIGH             0x20u
-#define __GFP_IO               0x40u
-#define __GFP_FS               0x80u
-#define __GFP_NOWARN           0x200u
-#define __GFP_ZERO             0x8000u
-#define __GFP_ATOMIC           0x80000u
-#define __GFP_ACCOUNT          0x100000u
-#define __GFP_DIRECT_RECLAIM   0x400000u
-#define __GFP_KSWAPD_RECLAIM   0x2000000u
-
-#define __GFP_RECLAIM  (__GFP_DIRECT_RECLAIM | __GFP_KSWAPD_RECLAIM)
-
-#define GFP_ZONEMASK   0x0fu
-#define GFP_ATOMIC     (__GFP_HIGH | __GFP_ATOMIC | __GFP_KSWAPD_RECLAIM)
-#define GFP_KERNEL     (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
-#define GFP_NOWAIT     (__GFP_KSWAPD_RECLAIM)
+#include <linux/gfp_types.h>
 
 static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
 {
diff --git a/tools/include/linux/gfp_types.h b/tools/include/linux/gfp_types.h
new file mode 100644 (file)
index 0000000..5f9f1ed
--- /dev/null
@@ -0,0 +1 @@
+#include "../../../include/linux/gfp_types.h"