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