diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
commit | 57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch) | |
tree | b5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /arch/arm64/include/asm/pgtable.h | |
parent | 0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff) | |
parent | 43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
"VM:
- z3fold fixes and enhancements by Henry Burns and Vitaly Wool
- more accurate reclaimed slab caches calculations by Yafang Shao
- fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
Christoph Hellwig
- !CONFIG_MMU fixes by Christoph Hellwig
- new novmcoredd parameter to omit device dumps from vmcore, by
Kairui Song
- new test_meminit module for testing heap and pagealloc
initialization, by Alexander Potapenko
- ioremap improvements for huge mappings, by Anshuman Khandual
- generalize kprobe page fault handling, by Anshuman Khandual
- device-dax hotplug fixes and improvements, by Pavel Tatashin
- enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
- add pte_devmap() support for arm64, by Robin Murphy
- unify locked_vm accounting with a helper, by Daniel Jordan
- several misc fixes
core/lib:
- new typeof_member() macro including some users, by Alexey Dobriyan
- make BIT() and GENMASK() available in asm, by Masahiro Yamada
- changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
code generation, by Alexey Dobriyan
- rbtree code size optimizations, by Michel Lespinasse
- convert struct pid count to refcount_t, by Joel Fernandes
get_maintainer.pl:
- add --no-moderated switch to skip moderated ML's, by Joe Perches
misc:
- ptrace PTRACE_GET_SYSCALL_INFO interface
- coda updates
- gdb scripts, various"
[ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
fs/select.c: use struct_size() in kmalloc()
mm: add account_locked_vm utility function
arm64: mm: implement pte_devmap support
mm: introduce ARCH_HAS_PTE_DEVMAP
mm: clean up is_device_*_page() definitions
mm/mmap: move common defines to mman-common.h
mm: move MAP_SYNC to asm-generic/mman-common.h
device-dax: "Hotremove" persistent memory that is used like normal RAM
mm/hotplug: make remove_memory() interface usable
device-dax: fix memory and resource leak if hotplug fails
include/linux/lz4.h: fix spelling and copy-paste errors in documentation
ipc/mqueue.c: only perform resource calculation if user valid
include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
scripts/gdb: add helpers to find and list devices
scripts/gdb: add lx-genpd-summary command
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
kernel/pid.c: convert struct pid count to refcount_t
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
...
Diffstat (limited to 'arch/arm64/include/asm/pgtable.h')
-rw-r--r-- | arch/arm64/include/asm/pgtable.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 3052381baaeb..87a4b2ddc1a1 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -79,6 +79,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | |||
79 | #define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE)) | 79 | #define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE)) |
80 | #define pte_user_exec(pte) (!(pte_val(pte) & PTE_UXN)) | 80 | #define pte_user_exec(pte) (!(pte_val(pte) & PTE_UXN)) |
81 | #define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT)) | 81 | #define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT)) |
82 | #define pte_devmap(pte) (!!(pte_val(pte) & PTE_DEVMAP)) | ||
82 | 83 | ||
83 | #define pte_cont_addr_end(addr, end) \ | 84 | #define pte_cont_addr_end(addr, end) \ |
84 | ({ unsigned long __boundary = ((addr) + CONT_PTE_SIZE) & CONT_PTE_MASK; \ | 85 | ({ unsigned long __boundary = ((addr) + CONT_PTE_SIZE) & CONT_PTE_MASK; \ |
@@ -206,6 +207,11 @@ static inline pmd_t pmd_mkcont(pmd_t pmd) | |||
206 | return __pmd(pmd_val(pmd) | PMD_SECT_CONT); | 207 | return __pmd(pmd_val(pmd) | PMD_SECT_CONT); |
207 | } | 208 | } |
208 | 209 | ||
210 | static inline pte_t pte_mkdevmap(pte_t pte) | ||
211 | { | ||
212 | return set_pte_bit(pte, __pgprot(PTE_DEVMAP)); | ||
213 | } | ||
214 | |||
209 | static inline void set_pte(pte_t *ptep, pte_t pte) | 215 | static inline void set_pte(pte_t *ptep, pte_t pte) |
210 | { | 216 | { |
211 | WRITE_ONCE(*ptep, pte); | 217 | WRITE_ONCE(*ptep, pte); |
@@ -388,6 +394,11 @@ static inline int pmd_protnone(pmd_t pmd) | |||
388 | 394 | ||
389 | #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) | 395 | #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) |
390 | 396 | ||
397 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
398 | #define pmd_devmap(pmd) pte_devmap(pmd_pte(pmd)) | ||
399 | #endif | ||
400 | #define pmd_mkdevmap(pmd) pte_pmd(pte_mkdevmap(pmd_pte(pmd))) | ||
401 | |||
391 | #define __pmd_to_phys(pmd) __pte_to_phys(pmd_pte(pmd)) | 402 | #define __pmd_to_phys(pmd) __pte_to_phys(pmd_pte(pmd)) |
392 | #define __phys_to_pmd_val(phys) __phys_to_pte_val(phys) | 403 | #define __phys_to_pmd_val(phys) __phys_to_pte_val(phys) |
393 | #define pmd_pfn(pmd) ((__pmd_to_phys(pmd) & PMD_MASK) >> PAGE_SHIFT) | 404 | #define pmd_pfn(pmd) ((__pmd_to_phys(pmd) & PMD_MASK) >> PAGE_SHIFT) |
@@ -673,6 +684,16 @@ static inline int pmdp_set_access_flags(struct vm_area_struct *vma, | |||
673 | { | 684 | { |
674 | return ptep_set_access_flags(vma, address, (pte_t *)pmdp, pmd_pte(entry), dirty); | 685 | return ptep_set_access_flags(vma, address, (pte_t *)pmdp, pmd_pte(entry), dirty); |
675 | } | 686 | } |
687 | |||
688 | static inline int pud_devmap(pud_t pud) | ||
689 | { | ||
690 | return 0; | ||
691 | } | ||
692 | |||
693 | static inline int pgd_devmap(pgd_t pgd) | ||
694 | { | ||
695 | return 0; | ||
696 | } | ||
676 | #endif | 697 | #endif |
677 | 698 | ||
678 | /* | 699 | /* |