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