|
@@ -40,6 +40,11 @@ struct vm_area_struct;
|
|
|
#define ___GFP_DIRECT_RECLAIM 0x400000u
|
|
|
#define ___GFP_WRITE 0x800000u
|
|
|
#define ___GFP_KSWAPD_RECLAIM 0x1000000u
|
|
|
+#ifdef CONFIG_LOCKDEP
|
|
|
+#define ___GFP_NOLOCKDEP 0x4000000u
|
|
|
+#else
|
|
|
+#define ___GFP_NOLOCKDEP 0
|
|
|
+#endif
|
|
|
/* If the above are modified, __GFP_BITS_SHIFT may need updating */
|
|
|
|
|
|
/*
|
|
@@ -179,8 +184,11 @@ struct vm_area_struct;
|
|
|
#define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK)
|
|
|
#define __GFP_NOTRACK_FALSE_POSITIVE (__GFP_NOTRACK)
|
|
|
|
|
|
+/* Disable lockdep for GFP context tracking */
|
|
|
+#define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP)
|
|
|
+
|
|
|
/* Room for N __GFP_FOO bits */
|
|
|
-#define __GFP_BITS_SHIFT 25
|
|
|
+#define __GFP_BITS_SHIFT (25 + IS_ENABLED(CONFIG_LOCKDEP))
|
|
|
#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
|
|
|
|
|
|
/*
|