]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - arch/powerpc/include/asm/pgalloc.h
Merge tag 'drm-misc-fixes-2018-06-21' of git://anongit.freedesktop.org/drm/drm-misc...
[mirror_ubuntu-jammy-kernel.git] / arch / powerpc / include / asm / pgalloc.h
CommitLineData
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
8static 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 */
15static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
16{
17 return gfp | __GFP_ACCOUNT;
18}
19#endif /* MODULE */
20
75f296d9 21#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)
5b6c133e 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 */