LinuxKPI: add default_gfp()
Various new allocation macros can take an optional gfp_t argument. If the argument is not given we need to set the GFP_KERNEL default. While this is only internally used and I initialy called it differently, should this spread elsewhere having the same name as in Linux will be good. Sponsored by: The FreeBSD Foundaton MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56392
This commit is contained in:
@@ -80,6 +80,9 @@
|
||||
CTASSERT((__GFP_DMA32 & GFP_NATIVE_MASK) == 0);
|
||||
CTASSERT((__GFP_BITS_MASK & GFP_NATIVE_MASK) == GFP_NATIVE_MASK);
|
||||
|
||||
#define __default_gfp(_discard, _arg_or_default, ...) _arg_or_default
|
||||
#define default_gfp(...) __default_gfp(, ##__VA_ARGS__, GFP_KERNEL)
|
||||
|
||||
struct page_frag_cache {
|
||||
void *va;
|
||||
int pagecnt_bias;
|
||||
|
||||
Reference in New Issue
Block a user