The patch titled Subject: asm-generic: don't include <linux/mm.h> in cacheflush.h has been added to the -mm tree. Its filename is asm-generic-dont-include-linux-mmh-in-cacheflushh.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/asm-generic-dont-include-linux-mmh-in-cacheflushh.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/asm-generic-dont-include-linux-mmh-in-cacheflushh.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Christoph Hellwig <hch@xxxxxx> Subject: asm-generic: don't include <linux/mm.h> in cacheflush.h This seems to lead to some crazy include loops when using asm-generic/cacheflush.h on more architectures, so leave it to the arch header for now. Link: http://lkml.kernel.org/r/20200515143646.3857579-7-hch@xxxxxx Signed-off-by: Christoph Hellwig <hch@xxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Nick Piggin <npiggin@xxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Jeff Dike <jdike@xxxxxxxxxxx> Cc: Richard Weinberger <richard@xxxxxx> Cc: Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Vishal Verma <vishal.l.verma@xxxxxxxxx> Cc: Dave Jiang <dave.jiang@xxxxxxxxx> Cc: Keith Busch <keith.busch@xxxxxxxxx> Cc: Ira Weiny <ira.weiny@xxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/um/include/asm/tlb.h | 2 ++ arch/x86/include/asm/cacheflush.h | 2 ++ drivers/nvdimm/pmem.c | 3 ++- include/asm-generic/cacheflush.h | 3 --- 4 files changed, 6 insertions(+), 4 deletions(-) --- a/arch/um/include/asm/tlb.h~asm-generic-dont-include-linux-mmh-in-cacheflushh +++ a/arch/um/include/asm/tlb.h @@ -2,6 +2,8 @@ #ifndef __UM_TLB_H #define __UM_TLB_H +#include <linux/mm.h> + #include <asm/tlbflush.h> #include <asm-generic/cacheflush.h> #include <asm-generic/tlb.h> --- a/arch/x86/include/asm/cacheflush.h~asm-generic-dont-include-linux-mmh-in-cacheflushh +++ a/arch/x86/include/asm/cacheflush.h @@ -2,6 +2,8 @@ #ifndef _ASM_X86_CACHEFLUSH_H #define _ASM_X86_CACHEFLUSH_H +#include <linux/mm.h> + /* Caches aren't brain-dead on the intel. */ #include <asm-generic/cacheflush.h> #include <asm/special_insns.h> --- a/drivers/nvdimm/pmem.c~asm-generic-dont-include-linux-mmh-in-cacheflushh +++ a/drivers/nvdimm/pmem.c @@ -7,7 +7,6 @@ * Copyright (c) 2015, Boaz Harrosh <boaz@xxxxxxxxxxxxx>. */ -#include <asm/cacheflush.h> #include <linux/blkdev.h> #include <linux/hdreg.h> #include <linux/init.h> @@ -25,6 +24,8 @@ #include <linux/dax.h> #include <linux/nd.h> #include <linux/backing-dev.h> +#include <linux/mm.h> +#include <asm/cacheflush.h> #include "pmem.h" #include "pfn.h" #include "nd.h" --- a/include/asm-generic/cacheflush.h~asm-generic-dont-include-linux-mmh-in-cacheflushh +++ a/include/asm-generic/cacheflush.h @@ -2,9 +2,6 @@ #ifndef _ASM_GENERIC_CACHEFLUSH_H #define _ASM_GENERIC_CACHEFLUSH_H -/* Keep includes the same across arches. */ -#include <linux/mm.h> - #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 /* _ Patches currently in -mm which might be from hch@xxxxxx are x86-hyperv-use-vmalloc_exec-for-the-hypercall-page.patch x86-fix-vmap-arguments-in-map_irq_stack.patch staging-android-ion-use-vmap-instead-of-vm_map_ram.patch staging-media-ipu3-use-vmap-instead-of-reimplementing-it.patch dma-mapping-use-vmap-insted-of-reimplementing-it.patch powerpc-add-an-ioremap_phb-helper.patch powerpc-remove-__ioremap_at-and-__iounmap_at.patch mm-remove-__get_vm_area.patch mm-unexport-unmap_kernel_range_noflush.patch mm-rename-config_pgtable_mapping-to-config_zsmalloc_pgtable_mapping.patch mm-only-allow-page-table-mappings-for-built-in-zsmalloc.patch mm-pass-addr-as-unsigned-long-to-vb_free.patch mm-remove-vmap_page_range_noflush-and-vunmap_page_range.patch mm-rename-vmap_page_range-to-map_kernel_range.patch mm-dont-return-the-number-of-pages-from-map_kernel_range_noflush.patch mm-remove-map_vm_range.patch mm-remove-unmap_vmap_area.patch mm-remove-the-prot-argument-from-vm_map_ram.patch mm-enforce-that-vmap-cant-map-pages-executable.patch gpu-drm-remove-the-powerpc-hack-in-drm_legacy_sg_alloc.patch mm-remove-the-pgprot-argument-to-__vmalloc.patch mm-remove-the-prot-argument-to-__vmalloc_node.patch mm-remove-both-instances-of-__vmalloc_node_flags.patch mm-remove-__vmalloc_node_flags_caller.patch mm-switch-the-test_vmalloc-module-to-use-__vmalloc_node.patch mm-remove-vmalloc_user_node_flags.patch arm64-use-__vmalloc_node-in-arch_alloc_vmap_stack.patch powerpc-use-__vmalloc_node-in-alloc_vm_stack.patch s390-use-__vmalloc_node-in-stack_alloc.patch exec-simplify-the-copy_strings_kernel-calling-convention.patch exec-open-code-copy_string_kernel.patch amdgpu-a-null-mm-does-not-mean-a-thread-is-a-kthread.patch kernel-move-use_mm-unuse_mm-to-kthreadc.patch kernel-move-use_mm-unuse_mm-to-kthreadc-v2.patch kernel-better-document-the-use_mm-unuse_mm-api-contract.patch kernel-better-document-the-use_mm-unuse_mm-api-contract-v2.patch kernel-set-user_ds-in-kthread_use_mm.patch arm-fix-the-flush_icache_range-arguments-in-set_fiq_handler.patch nds32-unexport-flush_icache_page.patch powerpc-unexport-flush_icache_user_range.patch unicore32-remove-flush_cache_user_range.patch asm-generic-fix-the-inclusion-guards-for-cacheflushh.patch asm-generic-dont-include-linux-mmh-in-cacheflushh.patch asm-generic-improve-the-flush_dcache_page-stub.patch alpha-use-asm-generic-cacheflushh.patch arm64-use-asm-generic-cacheflushh.patch c6x-use-asm-generic-cacheflushh.patch hexagon-use-asm-generic-cacheflushh.patch ia64-use-asm-generic-cacheflushh.patch microblaze-use-asm-generic-cacheflushh.patch m68knommu-use-asm-generic-cacheflushh.patch openrisc-use-asm-generic-cacheflushh.patch powerpc-use-asm-generic-cacheflushh.patch riscv-use-asm-generic-cacheflushh.patch armsparcunicore32-remove-flush_icache_user_range.patch mm-rename-flush_icache_user_range-to-flush_icache_user_page.patch asm-generic-add-a-flush_icache_user_range-stub.patch sh-implement-flush_icache_user_range.patch xtensa-implement-flush_icache_user_range.patch arm-rename-flush_cache_user_range-to-flush_icache_user_range.patch m68k-implement-flush_icache_user_range.patch exec-only-build-read_code-when-needed.patch exec-use-flush_icache_user_range-in-read_code.patch binfmt_flat-use-flush_icache_user_range.patch nommu-use-flush_icache_user_range-in-brk-and-mmap.patch module-move-the-set_fs-hack-for-flush_icache_range-to-m68k.patch