aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/mcf_pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/include/asm/mcf_pgtable.h')
-rw-r--r--arch/m68k/include/asm/mcf_pgtable.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/m68k/include/asm/mcf_pgtable.h b/arch/m68k/include/asm/mcf_pgtable.h
index 3c793682e5d9..2500ce04fcc4 100644
--- a/arch/m68k/include/asm/mcf_pgtable.h
+++ b/arch/m68k/include/asm/mcf_pgtable.h
@@ -35,7 +35,6 @@
35 * hitting hardware. 35 * hitting hardware.
36 */ 36 */
37#define CF_PAGE_DIRTY 0x00000001 37#define CF_PAGE_DIRTY 0x00000001
38#define CF_PAGE_FILE 0x00000200
39#define CF_PAGE_ACCESSED 0x00001000 38#define CF_PAGE_ACCESSED 0x00001000
40 39
41#define _PAGE_CACHE040 0x020 /* 68040 cache mode, cachable, copyback */ 40#define _PAGE_CACHE040 0x020 /* 68040 cache mode, cachable, copyback */
@@ -243,11 +242,6 @@ static inline int pte_young(pte_t pte)
243 return pte_val(pte) & CF_PAGE_ACCESSED; 242 return pte_val(pte) & CF_PAGE_ACCESSED;
244} 243}
245 244
246static inline int pte_file(pte_t pte)
247{
248 return pte_val(pte) & CF_PAGE_FILE;
249}
250
251static inline int pte_special(pte_t pte) 245static inline int pte_special(pte_t pte)
252{ 246{
253 return 0; 247 return 0;
@@ -391,26 +385,13 @@ static inline void cache_page(void *vaddr)
391 *ptep = pte_mkcache(*ptep); 385 *ptep = pte_mkcache(*ptep);
392} 386}
393 387
394#define PTE_FILE_MAX_BITS 21
395#define PTE_FILE_SHIFT 11
396
397static inline unsigned long pte_to_pgoff(pte_t pte)
398{
399 return pte_val(pte) >> PTE_FILE_SHIFT;
400}
401
402static inline pte_t pgoff_to_pte(unsigned pgoff)
403{
404 return __pte((pgoff << PTE_FILE_SHIFT) + CF_PAGE_FILE);
405}
406
407/* 388/*
408 * Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e)) 389 * Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e))
409 */ 390 */
410#define __swp_type(x) ((x).val & 0xFF) 391#define __swp_type(x) ((x).val & 0xFF)
411#define __swp_offset(x) ((x).val >> PTE_FILE_SHIFT) 392#define __swp_offset(x) ((x).val >> 11)
412#define __swp_entry(typ, off) ((swp_entry_t) { (typ) | \ 393#define __swp_entry(typ, off) ((swp_entry_t) { (typ) | \
413 (off << PTE_FILE_SHIFT) }) 394 (off << 11) })
414#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 395#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
415#define __swp_entry_to_pte(x) (__pte((x).val)) 396#define __swp_entry_to_pte(x) (__pte((x).val))
416 397