aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/pgtable-32.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/pgtable-32.h')
-rw-r--r--arch/mips/include/asm/pgtable-32.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
index 68984b612f9d..16aa9f23e17b 100644
--- a/arch/mips/include/asm/pgtable-32.h
+++ b/arch/mips/include/asm/pgtable-32.h
@@ -161,22 +161,6 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
161#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 161#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
162#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 162#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
163 163
164/*
165 * Encode and decode a nonlinear file mapping entry
166 */
167#define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \
168 (((_pte).pte >> 2 ) & 0x38) | \
169 (((_pte).pte >> 10) << 6 ))
170
171#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \
172 (((off) & 0x38) << 2 ) | \
173 (((off) >> 6 ) << 10) | \
174 _PAGE_FILE })
175
176/*
177 * Bits 0, 4, 8, and 9 are taken, split up 28 bits of offset into this range:
178 */
179#define PTE_FILE_MAX_BITS 28
180#else 164#else
181 165
182#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32) 166#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
@@ -188,13 +172,6 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
188#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) 172#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high })
189#define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) 173#define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val })
190 174
191/*
192 * Bits 0 and 1 of pte_high are taken, use the rest for the page offset...
193 */
194#define pte_to_pgoff(_pte) ((_pte).pte_high >> 2)
195#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 })
196
197#define PTE_FILE_MAX_BITS 30
198#else 175#else
199/* 176/*
200 * Constraints: 177 * Constraints:
@@ -209,19 +186,6 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
209#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 186#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
210#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 187#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
211 188
212/*
213 * Encode and decode a nonlinear file mapping entry
214 */
215#define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \
216 (((_pte).pte >> 2) & 0x8) | \
217 (((_pte).pte >> 8) << 4))
218
219#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \
220 (((off) & 0x8) << 2) | \
221 (((off) >> 4) << 8) | \
222 _PAGE_FILE })
223
224#define PTE_FILE_MAX_BITS 28
225#endif /* defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32) */ 189#endif /* defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32) */
226 190
227#endif /* defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) */ 191#endif /* defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) */