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 /include/linux/mm.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 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0389c34ac529..bd6512559bed 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -547,7 +547,7 @@ static inline void vma_set_anonymous(struct vm_area_struct *vma) | |||
547 | struct mmu_gather; | 547 | struct mmu_gather; |
548 | struct inode; | 548 | struct inode; |
549 | 549 | ||
550 | #if !defined(__HAVE_ARCH_PTE_DEVMAP) || !defined(CONFIG_TRANSPARENT_HUGEPAGE) | 550 | #if !defined(CONFIG_ARCH_HAS_PTE_DEVMAP) || !defined(CONFIG_TRANSPARENT_HUGEPAGE) |
551 | static inline int pmd_devmap(pmd_t pmd) | 551 | static inline int pmd_devmap(pmd_t pmd) |
552 | { | 552 | { |
553 | return 0; | 553 | return 0; |
@@ -956,41 +956,28 @@ static inline bool put_devmap_managed_page(struct page *page) | |||
956 | return false; | 956 | return false; |
957 | } | 957 | } |
958 | 958 | ||
959 | static inline bool is_device_private_page(const struct page *page) | ||
960 | { | ||
961 | return is_zone_device_page(page) && | ||
962 | page->pgmap->type == MEMORY_DEVICE_PRIVATE; | ||
963 | } | ||
964 | |||
965 | #ifdef CONFIG_PCI_P2PDMA | ||
966 | static inline bool is_pci_p2pdma_page(const struct page *page) | ||
967 | { | ||
968 | return is_zone_device_page(page) && | ||
969 | page->pgmap->type == MEMORY_DEVICE_PCI_P2PDMA; | ||
970 | } | ||
971 | #else /* CONFIG_PCI_P2PDMA */ | ||
972 | static inline bool is_pci_p2pdma_page(const struct page *page) | ||
973 | { | ||
974 | return false; | ||
975 | } | ||
976 | #endif /* CONFIG_PCI_P2PDMA */ | ||
977 | |||
978 | #else /* CONFIG_DEV_PAGEMAP_OPS */ | 959 | #else /* CONFIG_DEV_PAGEMAP_OPS */ |
979 | static inline bool put_devmap_managed_page(struct page *page) | 960 | static inline bool put_devmap_managed_page(struct page *page) |
980 | { | 961 | { |
981 | return false; | 962 | return false; |
982 | } | 963 | } |
964 | #endif /* CONFIG_DEV_PAGEMAP_OPS */ | ||
983 | 965 | ||
984 | static inline bool is_device_private_page(const struct page *page) | 966 | static inline bool is_device_private_page(const struct page *page) |
985 | { | 967 | { |
986 | return false; | 968 | return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && |
969 | IS_ENABLED(CONFIG_DEVICE_PRIVATE) && | ||
970 | is_zone_device_page(page) && | ||
971 | page->pgmap->type == MEMORY_DEVICE_PRIVATE; | ||
987 | } | 972 | } |
988 | 973 | ||
989 | static inline bool is_pci_p2pdma_page(const struct page *page) | 974 | static inline bool is_pci_p2pdma_page(const struct page *page) |
990 | { | 975 | { |
991 | return false; | 976 | return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && |
977 | IS_ENABLED(CONFIG_PCI_P2PDMA) && | ||
978 | is_zone_device_page(page) && | ||
979 | page->pgmap->type == MEMORY_DEVICE_PCI_P2PDMA; | ||
992 | } | 980 | } |
993 | #endif /* CONFIG_DEV_PAGEMAP_OPS */ | ||
994 | 981 | ||
995 | /* 127: arbitrary random number, small enough to assemble well */ | 982 | /* 127: arbitrary random number, small enough to assemble well */ |
996 | #define page_ref_zero_or_close_to_overflow(page) \ | 983 | #define page_ref_zero_or_close_to_overflow(page) \ |
@@ -1556,6 +1543,10 @@ long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages, | |||
1556 | int get_user_pages_fast(unsigned long start, int nr_pages, | 1543 | int get_user_pages_fast(unsigned long start, int nr_pages, |
1557 | unsigned int gup_flags, struct page **pages); | 1544 | unsigned int gup_flags, struct page **pages); |
1558 | 1545 | ||
1546 | int account_locked_vm(struct mm_struct *mm, unsigned long pages, bool inc); | ||
1547 | int __account_locked_vm(struct mm_struct *mm, unsigned long pages, bool inc, | ||
1548 | struct task_struct *task, bool bypass_rlim); | ||
1549 | |||
1559 | /* Container for pinned pfns / pages */ | 1550 | /* Container for pinned pfns / pages */ |
1560 | struct frame_vector { | 1551 | struct frame_vector { |
1561 | unsigned int nr_allocated; /* Number of frames we have space for */ | 1552 | unsigned int nr_allocated; /* Number of frames we have space for */ |
@@ -1763,7 +1754,7 @@ static inline void sync_mm_rss(struct mm_struct *mm) | |||
1763 | } | 1754 | } |
1764 | #endif | 1755 | #endif |
1765 | 1756 | ||
1766 | #ifndef __HAVE_ARCH_PTE_DEVMAP | 1757 | #ifndef CONFIG_ARCH_HAS_PTE_DEVMAP |
1767 | static inline int pte_devmap(pte_t pte) | 1758 | static inline int pte_devmap(pte_t pte) |
1768 | { | 1759 | { |
1769 | return 0; | 1760 | return 0; |
@@ -2767,7 +2758,13 @@ extern int randomize_va_space; | |||
2767 | #endif | 2758 | #endif |
2768 | 2759 | ||
2769 | const char * arch_vma_name(struct vm_area_struct *vma); | 2760 | const char * arch_vma_name(struct vm_area_struct *vma); |
2761 | #ifdef CONFIG_MMU | ||
2770 | void print_vma_addr(char *prefix, unsigned long rip); | 2762 | void print_vma_addr(char *prefix, unsigned long rip); |
2763 | #else | ||
2764 | static inline void print_vma_addr(char *prefix, unsigned long rip) | ||
2765 | { | ||
2766 | } | ||
2767 | #endif | ||
2771 | 2768 | ||
2772 | void *sparse_buffer_alloc(unsigned long size); | 2769 | void *sparse_buffer_alloc(unsigned long size); |
2773 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid, | 2770 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid, |