Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / powerpc / include / asm / pgalloc.h
blobe11f03007b5753dfd75753651c22f27d56559957
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_PGALLOC_H
3 #define _ASM_POWERPC_PGALLOC_H
5 #include <linux/mm.h>
7 #ifndef MODULE
8 static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
10 if (unlikely(mm == &init_mm))
11 return gfp;
12 return gfp | __GFP_ACCOUNT;
14 #else /* !MODULE */
15 static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
17 return gfp | __GFP_ACCOUNT;
19 #endif /* MODULE */
21 #define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)
23 #ifdef CONFIG_PPC_BOOK3S
24 #include <asm/book3s/pgalloc.h>
25 #else
26 #include <asm/nohash/pgalloc.h>
27 #endif
29 #endif /* _ASM_POWERPC_PGALLOC_H */