mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tools: Split <linux/gfp_types.h> out of <linux/gfp.h>
@ 2022-09-09 16:08 Wei Yang
  2022-09-09 17:34 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yang @ 2022-09-09 16:08 UTC (permalink / raw)
  To: yury.norov; +Cc: linux-kernel, Wei Yang, Mike Rapoport, Matthew Wilcox

Commit 9f162193d6e4 ("radix-tree: replace gfp.h inclusion with
gfp_types.h") change the include file, which is introduced in
commit cb5a065b4ea9c ("headers/deps: mm: Split <linux/gfp_types.h> out
of <linux/gfp.h>"). Since we don't do the split for test, current build
for radix-tree would fail.

Let's do the same as in commit cb5a065b4ea9c ("headers/deps: mm:
Split <linux/gfp_types.h> out of <linux/gfp.h>").

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
CC: Yury Norov <yury.norov@gmail.com>
CC: Mike Rapoport <rppt@kernel.org>
CC: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 tools/include/linux/gfp.h       | 21 +--------------------
 tools/include/linux/gfp_types.h | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 20 deletions(-)
 create mode 100644 tools/include/linux/gfp_types.h

diff --git a/tools/include/linux/gfp.h b/tools/include/linux/gfp.h
index b238dbc9eb85..6a10ff5f5be9 100644
--- a/tools/include/linux/gfp.h
+++ b/tools/include/linux/gfp.h
@@ -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
index 000000000000..cfeea788f273
--- /dev/null
+++ b/tools/include/linux/gfp_types.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _TOOLS_INCLUDE_LINUX_GFP_TYPES_H
+#define _TOOLS_INCLUDE_LINUX_GFP_TYPES_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)
+
+#endif /* _TOOLS_INCLUDE_LINUX_GFP_TYPES_H */
-- 
2.33.1


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

end of thread, other threads:[~2022-09-09 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09 16:08 [PATCH] tools: Split <linux/gfp_types.h> out of <linux/gfp.h> Wei Yang
2022-09-09 17:34 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®