Skip to content

Commit 3afa793

Browse files
Anshuman Khandualakpm00
authored andcommitted
mm/mmap: drop arch_vm_get_page_pgprot()
There are no platforms left which use arch_vm_get_page_prot(). Just drop generic arch_vm_get_page_prot(). Link: https://lkml.kernel.org/r/[email protected] Cc: Andrew Morton <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Christophe Leroy <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Signed-off-by: Anshuman Khandual <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: David S. Miller <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Khalid Aziz <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 5dcfc6a commit 3afa793

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

include/linux/mman.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@ static inline void vm_unacct_memory(long pages)
9393
#define arch_calc_vm_flag_bits(flags) 0
9494
#endif
9595

96-
#ifndef arch_vm_get_page_prot
97-
#define arch_vm_get_page_prot(vm_flags) __pgprot(0)
98-
#endif
99-
10096
#ifndef arch_validate_prot
10197
/*
10298
* This is called from mprotect(). PROT_GROWSDOWN and PROT_GROWSUP have

mm/mmap.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ pgprot_t protection_map[16] __ro_after_init = {
123123
#ifndef CONFIG_ARCH_HAS_VM_GET_PAGE_PROT
124124
pgprot_t vm_get_page_prot(unsigned long vm_flags)
125125
{
126-
return __pgprot(pgprot_val(protection_map[vm_flags &
127-
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
128-
pgprot_val(arch_vm_get_page_prot(vm_flags)));
126+
return protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
129127
}
130128
EXPORT_SYMBOL(vm_get_page_prot);
131129
#endif /* CONFIG_ARCH_HAS_VM_GET_PAGE_PROT */

0 commit comments

Comments
 (0)