kernel_optimize_test/arch/powerpc/mm
Dan Williams 09135cc594 mm, powerpc: use vma_kernel_pagesize() in vma_mmu_pagesize()
Patch series "mm, smaps: MMUPageSize for device-dax", v3.

Similar to commit 31383c6865 ("mm, hugetlbfs: introduce ->split() to
vm_operations_struct") here is another occasion where we want
special-case hugetlbfs/hstate enabling to also apply to device-dax.

This prompts the question what other hstate conversions we might do
beyond ->split() and ->pagesize(), but this appears to be the last of
the usages of hstate_vma() in generic/non-hugetlbfs specific code paths.

This patch (of 3):

The current powerpc definition of vma_mmu_pagesize() open codes looking
up the page size via hstate.  It is identical to the generic
vma_kernel_pagesize() implementation.

Now, vma_kernel_pagesize() is growing support for determining the page
size of Device-DAX vmas in addition to the existing Hugetlbfs page size
determination.

Ideally, if the powerpc vma_mmu_pagesize() used vma_kernel_pagesize() it
would automatically benefit from any new vma-type support that is added
to vma_kernel_pagesize().  However, the powerpc vma_mmu_pagesize() is
prevented from calling vma_kernel_pagesize() due to a circular header
dependency that requires vma_mmu_pagesize() to be defined before
including <linux/hugetlb.h>.

Break this circular dependency by defining the default vma_mmu_pagesize()
as a __weak symbol to be overridden by the powerpc version.

Link: http://lkml.kernel.org/r/151996254179.27922.2213728278535578744.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Jane Chu <jane.chu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-04-05 21:36:26 -07:00
..
8xx_mmu.c
40x_mmu.c
44x_mmu.c
copro_fault.c
dma-noncoherent.c
drmem.c powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2 2018-02-23 16:45:51 +11:00
dump_hashpagetable.c
dump_linuxpagetables.c
fault.c
fsl_booke_mmu.c
hash_low_32.S
hash_native_64.c powerpc/mm: Fixup tlbie vs store ordering issue on POWER9 2018-03-23 20:48:03 +11:00
hash_utils_64.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
hash64_4k.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
hash64_64k.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
highmem.c
hugepage-hash64.c
hugetlbpage-book3e.c
hugetlbpage-hash64.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
hugetlbpage-radix.c
hugetlbpage.c mm, powerpc: use vma_kernel_pagesize() in vma_mmu_pagesize() 2018-04-05 21:36:26 -07:00
init_32.c
init_64.c
init-common.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
Makefile
mem.c
mmap.c
mmu_context_book3s64.c powerpc/mm: Add tracking of the number of coprocessors using a context 2018-03-23 14:14:31 +11:00
mmu_context_hash32.c
mmu_context_iommu.c mm/migrate: rename migration reason MR_CMA to MR_CONTIG_RANGE 2018-04-05 21:36:24 -07:00
mmu_context_nohash.c
mmu_context.c
mmu_decl.h
numa.c powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove 2018-02-08 23:56:10 +11:00
pgtable_32.c
pgtable_64.c powerpc/mm: Fixup tlbie vs store ordering issue on POWER9 2018-03-23 20:48:03 +11:00
pgtable-book3e.c
pgtable-book3s64.c
pgtable-hash64.c
pgtable-radix.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
pgtable.c
pkeys.c
ppc_mmu_32.c
slb_low.S
slb.c
slice.c
subpage-prot.c
tlb_hash32.c
tlb_hash64.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
tlb_low_64e.S
tlb_nohash_low.S
tlb_nohash.c
tlb-radix.c powerpc/mm: Fixup tlbie vs store ordering issue on POWER9 2018-03-23 20:48:03 +11:00
vphn.c
vphn.h