blob: d18ffe7bc7c4a498a038f0a96f64c81227ac067b [file] [log] [blame]
Paul Mackerras047ea782005-11-19 20:17:32 +11001#ifndef _ASM_POWERPC_PGTABLE_H
2#define _ASM_POWERPC_PGTABLE_H
Arnd Bergmann88ced032005-12-16 22:43:46 +01003#ifdef __KERNEL__
Paul Mackerras047ea782005-11-19 20:17:32 +11004
David Gibson9c709f32007-06-13 14:52:56 +10005#ifndef __ASSEMBLY__
6#include <asm/processor.h> /* For TASK_SIZE */
7#include <asm/mmu.h>
8#include <asm/page.h>
9struct mm_struct;
10#endif /* !__ASSEMBLY__ */
11
David Gibsonf88df142007-04-30 16:30:56 +100012#if defined(CONFIG_PPC64)
13# include <asm/pgtable-ppc64.h>
Paul Mackerras047ea782005-11-19 20:17:32 +110014#else
David Gibsonf88df142007-04-30 16:30:56 +100015# include <asm/pgtable-ppc32.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#endif
17
18#ifndef __ASSEMBLY__
David Gibson9c709f32007-06-13 14:52:56 +100019/*
20 * ZERO_PAGE is a global shared page that is always zero: used
21 * for zero-mapped memory areas etc..
22 */
23extern unsigned long empty_zero_page[];
24#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
25
26extern pgd_t swapper_pg_dir[];
27
28extern void paging_init(void);
29
30/*
31 * kern_addr_valid is intended to indicate whether an address is a valid
32 * kernel address. Most 32-bit archs define it as always true (like this)
33 * but most 64-bit archs actually perform a test. What should we do here?
34 */
35#define kern_addr_valid(addr) (1)
36
37#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
38 remap_pfn_range(vma, vaddr, pfn, size, prot)
39
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#include <asm-generic/pgtable.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070041#endif /* __ASSEMBLY__ */
42
Arnd Bergmann88ced032005-12-16 22:43:46 +010043#endif /* __KERNEL__ */
Paul Mackerras047ea782005-11-19 20:17:32 +110044#endif /* _ASM_POWERPC_PGTABLE_H */