aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 19:45:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 19:45:56 -0500
commit992de5a8eca7cbd3215e3eb2c439b2c11582a58b (patch)
tree863988f84c1dd57a02fa337ecbce49263a3b9511 /arch/frv
parentb2718bffb4088faf13092db30c1ebf088ddee52e (diff)
parentd5b3cf7139b8770af4ed8bb36a1ab9d290ac39e9 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: "Bite-sized chunks this time, to avoid the MTA ratelimiting woes. - fs/notify updates - ocfs2 - some of MM" That laconic "some MM" is mainly the removal of remap_file_pages(), which is a big simplification of the VM, and which gets rid of a *lot* of random cruft and special cases because we no longer support the non-linear mappings that it used. From a user interface perspective, nothing has changed, because the remap_file_pages() syscall still exists, it's just done by emulating the old behavior by creating a lot of individual small mappings instead of one non-linear one. The emulation is slower than the old "native" non-linear mappings, but nobody really uses or cares about remap_file_pages(), and simplifying the VM is a big advantage. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (78 commits) memcg: zap memcg_slab_caches and memcg_slab_mutex memcg: zap memcg_name argument of memcg_create_kmem_cache memcg: zap __memcg_{charge,uncharge}_slab mm/page_alloc.c: place zone_id check before VM_BUG_ON_PAGE check mm: hugetlb: fix type of hugetlb_treat_as_movable variable mm, hugetlb: remove unnecessary lower bound on sysctl handlers"? mm: memory: merge shared-writable dirtying branches in do_wp_page() mm: memory: remove ->vm_file check on shared writable vmas xtensa: drop _PAGE_FILE and pte_file()-related helpers x86: drop _PAGE_FILE and pte_file()-related helpers unicore32: drop pte_file()-related helpers um: drop _PAGE_FILE and pte_file()-related helpers tile: drop pte_file()-related helpers sparc: drop pte_file()-related helpers sh: drop _PAGE_FILE and pte_file()-related helpers score: drop _PAGE_FILE and pte_file()-related helpers s390: drop pte_file()-related helpers parisc: drop _PAGE_FILE and pte_file()-related helpers openrisc: drop _PAGE_FILE and pte_file()-related helpers nios2: drop _PAGE_FILE and pte_file()-related helpers ...
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/include/asm/pgtable.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/arch/frv/include/asm/pgtable.h b/arch/frv/include/asm/pgtable.h
index eb0110acd19b..c49699d5902d 100644
--- a/arch/frv/include/asm/pgtable.h
+++ b/arch/frv/include/asm/pgtable.h
@@ -62,10 +62,6 @@ typedef pte_t *pte_addr_t;
62#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 62#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
63#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 63#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
64 64
65#ifndef __ASSEMBLY__
66static inline int pte_file(pte_t pte) { return 0; }
67#endif
68
69#define ZERO_PAGE(vaddr) ({ BUG(); NULL; }) 65#define ZERO_PAGE(vaddr) ({ BUG(); NULL; })
70 66
71#define swapper_pg_dir ((pgd_t *) NULL) 67#define swapper_pg_dir ((pgd_t *) NULL)
@@ -298,7 +294,6 @@ static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address)
298 294
299#define _PAGE_RESERVED_MASK (xAMPRx_RESERVED8 | xAMPRx_RESERVED13) 295#define _PAGE_RESERVED_MASK (xAMPRx_RESERVED8 | xAMPRx_RESERVED13)
300 296
301#define _PAGE_FILE 0x002 /* set:pagecache unset:swap */
302#define _PAGE_PROTNONE 0x000 /* If not present */ 297#define _PAGE_PROTNONE 0x000 /* If not present */
303 298
304#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) 299#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
@@ -463,27 +458,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
463 * Handle swap and file entries 458 * Handle swap and file entries
464 * - the PTE is encoded in the following format: 459 * - the PTE is encoded in the following format:
465 * bit 0: Must be 0 (!_PAGE_PRESENT) 460 * bit 0: Must be 0 (!_PAGE_PRESENT)
466 * bit 1: Type: 0 for swap, 1 for file (_PAGE_FILE) 461 * bits 1-6: Swap type
467 * bits 2-7: Swap type 462 * bits 7-31: Swap offset
468 * bits 8-31: Swap offset
469 * bits 2-31: File pgoff
470 */ 463 */
471#define __swp_type(x) (((x).val >> 2) & 0x1f) 464#define __swp_type(x) (((x).val >> 1) & 0x1f)
472#define __swp_offset(x) ((x).val >> 8) 465#define __swp_offset(x) ((x).val >> 7)
473#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 8) }) 466#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 7) })
474#define __pte_to_swp_entry(_pte) ((swp_entry_t) { (_pte).pte }) 467#define __pte_to_swp_entry(_pte) ((swp_entry_t) { (_pte).pte })
475#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 468#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
476 469
477static inline int pte_file(pte_t pte)
478{
479 return pte.pte & _PAGE_FILE;
480}
481
482#define PTE_FILE_MAX_BITS 29
483
484#define pte_to_pgoff(PTE) ((PTE).pte >> 2)
485#define pgoff_to_pte(off) __pte((off) << 2 | _PAGE_FILE)
486
487/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ 470/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
488#define PageSkip(page) (0) 471#define PageSkip(page) (0)
489#define kern_addr_valid(addr) (1) 472#define kern_addr_valid(addr) (1)