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