Skip to content

Commit

Permalink
score: drop _PAGE_FILE and pte_file()-related helpers
Browse files Browse the repository at this point in the history
We've replaced remap_file_pages(2) implementation with emulation.
Nobody creates non-linear mapping anymore.

This patch also increase number of bits availble for swap offset.

Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Chen Liqin <[email protected]>
Cc: Lennox Wu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Feb 10, 2015
1 parent 6e76d4b commit 917e401
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion arch/score/include/asm/pgtable-bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define _PAGE_WRITE (1<<7) /* implemented in software */
#define _PAGE_PRESENT (1<<9) /* implemented in software */
#define _PAGE_MODIFIED (1<<10) /* implemented in software */
#define _PAGE_FILE (1<<10)

#define _PAGE_GLOBAL (1<<0)
#define _PAGE_VALID (1<<1)
Expand Down
18 changes: 2 additions & 16 deletions arch/score/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ static inline void pmd_clear(pmd_t *pmdp)
((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
#define pte_unmap(pte) ((void)(pte))

/*
* Bits 9(_PAGE_PRESENT) and 10(_PAGE_FILE)are taken,
* split up 30 bits of offset into this range:
*/
#define PTE_FILE_MAX_BITS 30
#define pte_to_pgoff(_pte) \
(((_pte).pte & 0x1ff) | (((_pte).pte >> 11) << 9))
#define pgoff_to_pte(off) \
((pte_t) {((off) & 0x1ff) | (((off) >> 9) << 11) | _PAGE_FILE})
#define __pte_to_swp_entry(pte) \
((swp_entry_t) { pte_val(pte)})
#define __swp_entry_to_pte(x) ((pte_t) {(x).val})
Expand Down Expand Up @@ -169,8 +160,8 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
}

#define __swp_type(x) ((x).val & 0x1f)
#define __swp_offset(x) ((x).val >> 11)
#define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 11)})
#define __swp_offset(x) ((x).val >> 10)
#define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 10)})

extern unsigned long empty_zero_page;
extern unsigned long zero_page_mask;
Expand Down Expand Up @@ -198,11 +189,6 @@ static inline int pte_young(pte_t pte)
return pte_val(pte) & _PAGE_ACCESSED;
}

static inline int pte_file(pte_t pte)
{
return pte_val(pte) & _PAGE_FILE;
}

#define pte_special(pte) (0)

static inline pte_t pte_wrprotect(pte_t pte)
Expand Down

0 comments on commit 917e401

Please sign in to comment.