diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-06-13 00:52:56 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-14 08:30:15 -0400 |
commit | 9c709f3b62ee8ee0dfadf358e361802cab7eea7a (patch) | |
tree | 56d2e624ecf851d1b7f55a03d04662a470e1373a /include/asm-powerpc/pgtable-ppc32.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-ppc32.h')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 63c535d0253..5b14536d4af 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -6,11 +6,7 @@ | |||
6 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/threads.h> | 8 | #include <linux/threads.h> |
9 | #include <asm/processor.h> /* For TASK_SIZE */ | ||
10 | #include <asm/mmu.h> | ||
11 | #include <asm/page.h> | ||
12 | #include <asm/io.h> /* For sub-arch specific PPC_PIN_SIZE */ | 9 | #include <asm/io.h> /* For sub-arch specific PPC_PIN_SIZE */ |
13 | struct mm_struct; | ||
14 | 10 | ||
15 | extern unsigned long va_to_phys(unsigned long address); | 11 | extern unsigned long va_to_phys(unsigned long address); |
16 | extern pte_t *va_to_pte(unsigned long address); | 12 | extern pte_t *va_to_pte(unsigned long address); |
@@ -488,14 +484,6 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
488 | #define pfn_pte(pfn, prot) __pte(((pte_basic_t)(pfn) << PFN_SHIFT_OFFSET) |\ | 484 | #define pfn_pte(pfn, prot) __pte(((pte_basic_t)(pfn) << PFN_SHIFT_OFFSET) |\ |
489 | pgprot_val(prot)) | 485 | pgprot_val(prot)) |
490 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) | 486 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) |
491 | |||
492 | /* | ||
493 | * ZERO_PAGE is a global shared page that is always zero: used | ||
494 | * for zero-mapped memory areas etc.. | ||
495 | */ | ||
496 | extern unsigned long empty_zero_page[1024]; | ||
497 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) | ||
498 | |||
499 | #endif /* __ASSEMBLY__ */ | 487 | #endif /* __ASSEMBLY__ */ |
500 | 488 | ||
501 | #define pte_none(pte) ((pte_val(pte) & ~_PTE_NONE_MASK) == 0) | 489 | #define pte_none(pte) ((pte_val(pte) & ~_PTE_NONE_MASK) == 0) |
@@ -730,10 +718,6 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
730 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) | 718 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) |
731 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) | 719 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) |
732 | 720 | ||
733 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | ||
734 | |||
735 | extern void paging_init(void); | ||
736 | |||
737 | /* | 721 | /* |
738 | * Encode and decode a swap entry. | 722 | * Encode and decode a swap entry. |
739 | * Note that the bits we use in a PTE for representing a swap entry | 723 | * Note that the bits we use in a PTE for representing a swap entry |
@@ -751,12 +735,6 @@ extern void paging_init(void); | |||
751 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) | 735 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) |
752 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) | 736 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) |
753 | 737 | ||
754 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | ||
755 | #define kern_addr_valid(addr) (1) | ||
756 | |||
757 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
758 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
759 | |||
760 | /* | 738 | /* |
761 | * No page table caches to initialise | 739 | * No page table caches to initialise |
762 | */ | 740 | */ |