2005-11-19 17:17:32 +08:00
|
|
|
#ifndef _ASM_POWERPC_PGALLOC_H
|
|
|
|
#define _ASM_POWERPC_PGALLOC_H
|
|
|
|
|
2008-11-19 20:50:04 +08:00
|
|
|
#include <linux/mm.h>
|
|
|
|
|
2017-05-02 13:17:04 +08:00
|
|
|
#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 */
|
|
|
|
|
2016-04-29 21:26:14 +08:00
|
|
|
#ifdef CONFIG_PPC_BOOK3S
|
|
|
|
#include <asm/book3s/pgalloc.h>
|
2005-11-19 17:17:32 +08:00
|
|
|
#else
|
2016-04-29 21:26:14 +08:00
|
|
|
#include <asm/nohash/pgalloc.h>
|
2005-11-07 08:06:55 +08:00
|
|
|
#endif
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-19 17:17:32 +08:00
|
|
|
#endif /* _ASM_POWERPC_PGALLOC_H */
|