diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-29 17:49:12 -0400 | 
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-29 17:49:12 -0400 | 
| commit | b0c4e148bd591629749d02a8fbc8d81c26d548cf (patch) | |
| tree | 3e2142635f3dc2ceeae870ead2dceab7b9c6def1 /include/asm-mips/pgalloc.h | |
| parent | 5615ca7906aefbdc3318604c89db5931d0a25910 (diff) | |
| parent | be15cd72d256e5eb3261a781b8507fac83ab33f6 (diff) | |
Merge branch 'master'
Diffstat (limited to 'include/asm-mips/pgalloc.h')
| -rw-r--r-- | include/asm-mips/pgalloc.h | 19 | 
1 files changed, 14 insertions, 5 deletions
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index ce57288d43bd..fe1df572318b 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h  | |||
| @@ -26,10 +26,22 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | |||
| 26 | } | 26 | } | 
| 27 | 27 | ||
| 28 | /* | 28 | /* | 
| 29 | * Initialize a new pmd table with invalid pointers. | ||
| 30 | */ | ||
| 31 | extern void pmd_init(unsigned long page, unsigned long pagetable); | ||
| 32 | |||
| 33 | #ifdef CONFIG_64BIT | ||
| 34 | |||
| 35 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) | ||
| 36 | { | ||
| 37 | set_pud(pud, __pud((unsigned long)pmd)); | ||
| 38 | } | ||
| 39 | #endif | ||
| 40 | |||
| 41 | /* | ||
| 29 | * Initialize a new pgd / pmd table with invalid pointers. | 42 | * Initialize a new pgd / pmd table with invalid pointers. | 
| 30 | */ | 43 | */ | 
| 31 | extern void pgd_init(unsigned long page); | 44 | extern void pgd_init(unsigned long page); | 
| 32 | extern void pmd_init(unsigned long page, unsigned long pagetable); | ||
| 33 | 45 | ||
| 34 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 46 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | 
| 35 | { | 47 | { | 
| @@ -86,21 +98,18 @@ static inline void pte_free(struct page *pte) | |||
| 86 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 98 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 
| 87 | 99 | ||
| 88 | #ifdef CONFIG_32BIT | 100 | #ifdef CONFIG_32BIT | 
| 89 | #define pgd_populate(mm, pmd, pte) BUG() | ||
| 90 | 101 | ||
| 91 | /* | 102 | /* | 
| 92 | * allocating and freeing a pmd is trivial: the 1-entry pmd is | 103 | * allocating and freeing a pmd is trivial: the 1-entry pmd is | 
| 93 | * inside the pgd, so has no extra memory associated with it. | 104 | * inside the pgd, so has no extra memory associated with it. | 
| 94 | */ | 105 | */ | 
| 95 | #define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); }) | ||
| 96 | #define pmd_free(x) do { } while (0) | 106 | #define pmd_free(x) do { } while (0) | 
| 97 | #define __pmd_free_tlb(tlb,x) do { } while (0) | 107 | #define __pmd_free_tlb(tlb,x) do { } while (0) | 
| 108 | |||
| 98 | #endif | 109 | #endif | 
| 99 | 110 | ||
| 100 | #ifdef CONFIG_64BIT | 111 | #ifdef CONFIG_64BIT | 
| 101 | 112 | ||
| 102 | #define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd)) | ||
| 103 | |||
| 104 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | 113 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | 
| 105 | { | 114 | { | 
| 106 | pmd_t *pmd; | 115 | pmd_t *pmd; | 
