linux-next: manual merge of the mm tree with the mm-fixes tree
Subsystems (2)
Mark Brown
maintainerHi all,
Today's linux-next merge of the mm tree got a conflict in:
include/linux/mm.h
between commits:
4ad0729ad201b ("mm: fix missing page-table destructor in pagetable_free()") b8fdad7f507db ("mm-vma-read-anon_vma-carefully-in-validate_mm-fix")
from the mm-fixes tree and commit:
3b11ce5e7f0cf ("mm: remove pagetable_dtor_free()")
from the mm tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
include/linux/mm.h +0 -0
@@@ -38,7 -38,6 +38,6 @@@#include <linux/bitops.h> #include <linux/iommu-debug-pagealloc.h> #include <linux/kcsan-checks.h> -#include <linux/vmemmap-optimization.h> struct mempolicy ;struct anon_vma ;return PAGE_SHIFT +compound_order (page); } -/** -* thp_order - Order of a transparent huge page. -* @page: Head page of a transparent huge page. -*/ -static inline unsigned int thp_order (struct page *page) - { -VM_BUG_ON_PGFLAGS (PageTail (page), page); -return compound_order (page); - } - -/** -* thp_size - Size of a transparent huge page. -* @page: Head page of a transparent huge page. -* -* Return: Number of bytes in this page. -*/ -static inline unsigned long thp_size (struct page *page) - { -return PAGE_SIZE <<thp_order (page); - } -#ifdef CONFIG_MMU /* * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when return pte; } - vm_fault_t do_set_pmd(struct vm_fault *vmf, struct folio *folio, struct page *page); +vm_fault_t do_set_pmd(struct vm_fault *vmf, struct folio *folio, struct page *page, +bool may_alloc); void set_pte_range(struct vm_fault *vmf, struct folio *folio, struct page *page, unsigned int nr, unsigned long addr); } } - static inline void pagetable_dtor_free(struct ptdesc *ptdesc) -{ -pagetable_dtor(ptdesc); -pagetable_free(ptdesc); -} -static inline bool pagetable_pte_ctor(struct mm_struct *mm, struct ptdesc *ptdesc) { unsigned long pfn, pgprot_t pgprot); vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); -vm_fault_t vmf_insert_mixed_mkwrite(struct vm_area_struct *vma, -unsigned long addr, unsigned long pfn); int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len); static inline vm_fault_t vmf_insert_page(struct vm_area_struct *vma, #endif struct page * __populate_section_memmap(unsigned long pfn, -unsigned long nr_pages, int nid, struct vmem_altmap *altmap, -struct dev_pagemap *pgmap); +unsigned long nr_pages, int nid, struct vmem_altmap *altmap); void *vmemmap_alloc_block(unsigned long size, int node); struct vmem_altmap; void *vmemmap_alloc_block_buf(unsigned long size, int node, int node, struct vmem_altmap *altmap); int vmemmap_populate(unsigned long start, unsigned long end, int node, struct vmem_altmap *altmap); -void vmemmap_wrprotect_hvo(unsigned long start, unsigned long end, int node, -unsigned long headsize); void vmemmap_populate_print_last(void); #ifdef CONFIG_MEMORY_HOTPLUG void vmemmap_free(unsigned long start, unsigned long end, } #endif - #ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP -static inline bool __vmemmap_can_optimize(struct vmem_altmap *altmap, -struct dev_pagemap *pgmap) -{ -unsigned long nr_pages; -unsigned long nr_vmemmap_pages; -- if (!IS_ENABLED(CONFIG_VMEMMAP_OPTIMIZATION)) -return false; -- if (!pgmap || !is_power_of_2(sizeof(struct page))) -return false; -- nr_pages = pgmap_vmemmap_nr(pgmap); -nr_vmemmap_pages = ((nr_pages * sizeof(struct page)) >> PAGE_SHIFT); -/* -* For vmemmap optimization with DAX we need minimum 2 vmemmap -* pages. See layout diagram in Documentation/mm/vmemmap_dedup.rst -*/ - return !altmap && (nr_vmemmap_pages > VMEMMAP_OPTIMIZATION_PAGES); - } -/* -* If we don't have an architecture override, use the generic rule -*/ -#ifndef vmemmap_can_optimize -#define vmemmap_can_optimize __vmemmap_can_optimize -#endif - -#else -static inline bool vmemmap_can_optimize (struct vmem_altmap *altmap, -struct dev_pagemap *pgmap) - { -return false; - } -#endif -enum mf_flags { MF_COUNT_INCREASED = 1 << 0, MF_ACTION_REQUIRED = 1 << 1,