Files

29 lines
620 B
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_PGALLOC_H
#define _ASM_POWERPC_PGALLOC_H
#include <linux/mm.h>
#ifndef MODULE
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
{
if (unlikely(mm == &init_mm))
return gfp;
return gfp | __GFP_ACCOUNT;
}
#else /* !MODULE */
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
{
return gfp | __GFP_ACCOUNT;
}
#endif /* MODULE */
#define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO)
2016-04-29 23:26:14 +10:00
#ifdef CONFIG_PPC_BOOK3S
#include <asm/book3s/pgalloc.h>
#else
2016-04-29 23:26:14 +10:00
#include <asm/nohash/pgalloc.h>
2005-11-07 11:06:55 +11:00
#endif
2005-04-16 15:20:36 -07:00
#endif /* _ASM_POWERPC_PGALLOC_H */