tools: Fix compilation after gfp_types.h split
PATCH 1/1 tools: Fix compilation after gfp_types.h split
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.
Reported-by Liam R. Howlett <[email protected]>
Fixes cb5a065b4ea9 (headers/deps: mm: Split <linux/gfp_types.h> out of <linux/gfp.h>)
Cc Ingo Molnar <[email protected]>
Cc Yury Norov <[email protected]>
Signed-off-by Matthew Wilcox (Oracle) <[email protected]>
--- tools/include/linux/gfp.h | 21 +-------------------- tools/include/linux/gfp_types.h | 1 + 2 files changed, 2 insertions(+), 20 deletions(-) create mode 100644 tools/include/linux/gfp_types.h
tools/include/linux/gfp.h +1 -20
@@ -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) {
tools/include/linux/gfp_types.h new file +1 -0
@@ -0,0 +1 @@ +#include "../../../include/linux/gfp_types.h"
Signature · 1 line
2.35.1
Quoted 8 lines · Matthew Wilcox (Oracle)
When
gfp_types.hwas split fromgfp.h, it broke the radix test suite. Fix the test suite by usinggfp_types.hin the toolsgfp.hheader.Reported-by Liam R. Howlett <[email protected]>Fixes cb5a065b4ea9 (headers/deps: mm: Split <linux/gfp_types.h> out of <linux/gfp.h>)Cc Ingo Molnar <[email protected]>Cc Yury Norov <[email protected]>Signed-off-by Matthew Wilcox (Oracle) <[email protected]>
Reviewed-by Yury Norov <[email protected]>
Quoted 47 lines
--- tools/include/linux/gfp.h | 21 +-------------------- tools/include/linux/gfp_types.h | 1 + 2 files changed, 2 insertions(+), 20 deletions(-) create mode 100644 tools/include/linux/gfp_types.htools/include/linux/gfp.h +1
-20@@ -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) {tools/include/linux/gfp_types.h new file +1
-0@@ -0,0 +1 @@ +#include "../../../include/linux/gfp_types.h" Signature · 1 line
2.35.1