aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/pgtable.h')
-rw-r--r--arch/powerpc/include/asm/pgtable.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 9679b7519a35..dad1d27e196d 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -66,7 +66,6 @@ extern unsigned long empty_zero_page[];
66 66
67extern pgd_t swapper_pg_dir[]; 67extern pgd_t swapper_pg_dir[];
68 68
69void limit_zone_pfn(enum zone_type zone, unsigned long max_pfn);
70int dma_pfn_limit_to_zone(u64 pfn_limit); 69int dma_pfn_limit_to_zone(u64 pfn_limit);
71extern void paging_init(void); 70extern void paging_init(void);
72 71
@@ -101,7 +100,7 @@ extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
101/* can we use this in kvm */ 100/* can we use this in kvm */
102unsigned long vmalloc_to_phys(void *vmalloc_addr); 101unsigned long vmalloc_to_phys(void *vmalloc_addr);
103 102
104void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); 103void pgtable_cache_add(unsigned int shift);
105void pgtable_cache_init(void); 104void pgtable_cache_init(void);
106 105
107#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_PPC32) 106#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_PPC32)
@@ -110,6 +109,35 @@ void mark_initmem_nx(void);
110static inline void mark_initmem_nx(void) { } 109static inline void mark_initmem_nx(void) { }
111#endif 110#endif
112 111
112/*
113 * When used, PTE_FRAG_NR is defined in subarch pgtable.h
114 * so we are sure it is included when arriving here.
115 */
116#ifdef PTE_FRAG_NR
117static inline void *pte_frag_get(mm_context_t *ctx)
118{
119 return ctx->pte_frag;
120}
121
122static inline void pte_frag_set(mm_context_t *ctx, void *p)
123{
124 ctx->pte_frag = p;
125}
126#else
127#define PTE_FRAG_NR 1
128#define PTE_FRAG_SIZE_SHIFT PAGE_SHIFT
129#define PTE_FRAG_SIZE (1UL << PTE_FRAG_SIZE_SHIFT)
130
131static inline void *pte_frag_get(mm_context_t *ctx)
132{
133 return NULL;
134}
135
136static inline void pte_frag_set(mm_context_t *ctx, void *p)
137{
138}
139#endif
140
113#endif /* __ASSEMBLY__ */ 141#endif /* __ASSEMBLY__ */
114 142
115#endif /* _ASM_POWERPC_PGTABLE_H */ 143#endif /* _ASM_POWERPC_PGTABLE_H */