1
2#ifndef _ASM_POWERPC_PGTABLE_H
3#define _ASM_POWERPC_PGTABLE_H
4
5#ifndef __ASSEMBLY__
6#include <linux/mmdebug.h>
7#include <linux/mmzone.h>
8#include <asm/processor.h>
9#include <asm/mmu.h>
10#include <asm/page.h>
11
12struct mm_struct;
13
14#endif
15
16#ifdef CONFIG_PPC_BOOK3S
17#include <asm/book3s/pgtable.h>
18#else
19#include <asm/nohash/pgtable.h>
20#endif
21
22#ifndef __ASSEMBLY__
23
24#include <asm/tlbflush.h>
25
26
27#define pte_page(x) pfn_to_page(pte_pfn(x))
28#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
29
30
31
32
33
34extern unsigned long empty_zero_page[];
35#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
36
37extern pgd_t swapper_pg_dir[];
38
39void limit_zone_pfn(enum zone_type zone, unsigned long max_pfn);
40int dma_pfn_limit_to_zone(u64 pfn_limit);
41extern void paging_init(void);
42
43
44
45
46
47
48#define kern_addr_valid(addr) (1)
49
50#include <asm-generic/pgtable.h>
51
52
53
54
55
56
57
58
59
60
61
62extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);
63
64extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
65 unsigned long end, int write,
66 struct page **pages, int *nr);
67#ifndef CONFIG_TRANSPARENT_HUGEPAGE
68#define pmd_large(pmd) 0
69#endif
70
71
72unsigned long vmalloc_to_phys(void *vmalloc_addr);
73
74void pgtable_cache_add(unsigned shift, void (*ctor)(void *));
75void pgtable_cache_init(void);
76
77#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_PPC32)
78void mark_initmem_nx(void);
79#else
80static inline void mark_initmem_nx(void) { }
81#endif
82
83#endif
84
85#endif
86