1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_PGALLOC_H
3 #define _ASM_POWERPC_PGALLOC_H
8 static inline gfp_t
pgtable_gfp_flags(struct mm_struct
*mm
, gfp_t gfp
)
10 if (unlikely(mm
== &init_mm
))
12 return gfp
| __GFP_ACCOUNT
;
15 static inline gfp_t
pgtable_gfp_flags(struct mm_struct
*mm
, gfp_t gfp
)
17 return gfp
| __GFP_ACCOUNT
;
21 #define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)
23 #ifdef CONFIG_PPC_BOOK3S
24 #include <asm/book3s/pgalloc.h>
26 #include <asm/nohash/pgalloc.h>
29 #endif /* _ASM_POWERPC_PGALLOC_H */