diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-06-13 14:52:56 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-14 22:30:15 +1000 |
commit | 9c709f3b62ee8ee0dfadf358e361802cab7eea7a (patch) | |
tree | 56d2e624ecf851d1b7f55a03d04662a470e1373a /include/asm-powerpc/pgtable.h | |
parent | c0770f686cf8f464b5b9d4bd28c1ed7604c97ed4 (diff) |
[POWERPC] Start factoring pgtable-ppc32.h and pgtable-ppc64.h
This factors some things defined in both pgtable-ppc32.h and
pgtable-ppc64.h into the common part of asm-powerpc/pgtable.h. These
are all things which have essentially identical definitions, and which
by their nature are very unlikely ever to need different definitions
in the two cases.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/pgtable.h')
-rw-r--r-- | include/asm-powerpc/pgtable.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index 78bf4ae712a6..d18ffe7bc7c4 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h @@ -2,6 +2,13 @@ #define _ASM_POWERPC_PGTABLE_H #ifdef __KERNEL__ +#ifndef __ASSEMBLY__ +#include <asm/processor.h> /* For TASK_SIZE */ +#include <asm/mmu.h> +#include <asm/page.h> +struct mm_struct; +#endif /* !__ASSEMBLY__ */ + #if defined(CONFIG_PPC64) # include <asm/pgtable-ppc64.h> #else @@ -9,6 +16,27 @@ #endif #ifndef __ASSEMBLY__ +/* + * ZERO_PAGE is a global shared page that is always zero: used + * for zero-mapped memory areas etc.. + */ +extern unsigned long empty_zero_page[]; +#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) + +extern pgd_t swapper_pg_dir[]; + +extern void paging_init(void); + +/* + * kern_addr_valid is intended to indicate whether an address is a valid + * kernel address. Most 32-bit archs define it as always true (like this) + * but most 64-bit archs actually perform a test. What should we do here? + */ +#define kern_addr_valid(addr) (1) + +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + #include <asm-generic/pgtable.h> #endif /* __ASSEMBLY__ */ |