]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
047ea784 PM |
2 | #ifndef _ASM_POWERPC_PGALLOC_H |
3 | #define _ASM_POWERPC_PGALLOC_H | |
4 | ||
0186f47e KG |
5 | #include <linux/mm.h> |
6 | ||
de3b8761 BS |
7 | #ifndef MODULE |
8 | static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp) | |
9 | { | |
10 | if (unlikely(mm == &init_mm)) | |
11 | return gfp; | |
12 | return gfp | __GFP_ACCOUNT; | |
13 | } | |
14 | #else /* !MODULE */ | |
15 | static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp) | |
16 | { | |
17 | return gfp | __GFP_ACCOUNT; | |
18 | } | |
19 | #endif /* MODULE */ | |
20 | ||
5b6c133e ME |
21 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) |
22 | ||
75a9b8a6 AK |
23 | #ifdef CONFIG_PPC_BOOK3S |
24 | #include <asm/book3s/pgalloc.h> | |
047ea784 | 25 | #else |
75a9b8a6 | 26 | #include <asm/nohash/pgalloc.h> |
3c726f8d | 27 | #endif |
1da177e4 | 28 | |
047ea784 | 29 | #endif /* _ASM_POWERPC_PGALLOC_H */ |