Dan Williams <dan.j.williams@xxxxxxxxx> writes: > 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. > > Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> > Cc: Paul Mackerras <paulus@xxxxxxxxx> > Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> > Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> > --- > arch/powerpc/include/asm/hugetlb.h | 6 ------ > arch/powerpc/mm/hugetlbpage.c | 5 +---- > mm/hugetlb.c | 8 +++----- > 3 files changed, 4 insertions(+), 15 deletions(-) This looks OK to me. I was worried switching to a weak symbol would mean it doesn't get inlined, but it's not inlined today anyway! Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> (powerpc) cheers -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>