lkml.org 
[lkml]   [2020]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 06/29] asm-generic: don't include <linux/mm.h> in cacheflush.h
    Date
    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.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    ---
    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(-)

    diff --git a/arch/um/include/asm/tlb.h b/arch/um/include/asm/tlb.h
    index 70ee603839006..ff9c62828962c 100644
    --- a/arch/um/include/asm/tlb.h
    +++ b/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>
    diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h
    index 63feaf2a5f93d..b192d917a6d0b 100644
    --- a/arch/x86/include/asm/cacheflush.h
    +++ b/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>
    diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
    index 2df6994acf836..55282a6217407 100644
    --- a/drivers/nvdimm/pmem.c
    +++ b/drivers/nvdimm/pmem.c
    @@ -7,7 +7,6 @@
    * Copyright (c) 2015, Boaz Harrosh <boaz@plexistor.com>.
    */

    -#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"
    diff --git a/include/asm-generic/cacheflush.h b/include/asm-generic/cacheflush.h
    index 906277492ec59..bf9bb83e9fc8d 100644
    --- a/include/asm-generic/cacheflush.h
    +++ b/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

    /*
    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-15 16:40    [W:4.175 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site