From: Wei Yang <richard.weiyang@gmail.com>
To: yury.norov@gmail.com
Cc: linux-kernel@vger.kernel.org,
Wei Yang <richard.weiyang@gmail.com>,
Mike Rapoport <rppt@kernel.org>,
Matthew Wilcox <willy@infradead.org>
Subject: [PATCH] tools: Split <linux/gfp_types.h> out of <linux/gfp.h>
Date: Fri, 9 Sep 2022 16:08:01 +0000 [thread overview]
Message-ID: <20220909160801.11070-1-richard.weiyang@gmail.com> (raw)
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
next reply other threads:[~2022-09-09 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 16:08 Wei Yang [this message]
2022-09-09 17:34 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220909160801.11070-1-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rppt@kernel.org \
--cc=willy@infradead.org \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®