lkml.org 
[lkml]   [2020]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 17/31] openrisc: use asm-generic/cacheflush.h
    Date
    OpenRISC needs almost no cache flushing routines of its own.  Rely on
    asm-generic/cacheflush.h for the defaults.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    ---
    arch/openrisc/include/asm/cacheflush.h | 31 +++++---------------------
    1 file changed, 6 insertions(+), 25 deletions(-)

    diff --git a/arch/openrisc/include/asm/cacheflush.h b/arch/openrisc/include/asm/cacheflush.h
    index 79d5d7753fe4b..74d1fce4e8839 100644
    --- a/arch/openrisc/include/asm/cacheflush.h
    +++ b/arch/openrisc/include/asm/cacheflush.h
    @@ -62,31 +62,12 @@ static inline void flush_dcache_page(struct page *page)
    clear_bit(PG_dc_clean, &page->flags);
    }

    -/*
    - * Other interfaces are not required since we do not have virtually
    - * indexed or tagged caches. So we can use the default here.
    - */
    -#define flush_cache_all() do { } while (0)
    -#define flush_cache_mm(mm) do { } while (0)
    -#define flush_cache_dup_mm(mm) do { } while (0)
    -#define flush_cache_range(vma, start, end) do { } while (0)
    -#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
    -#define flush_dcache_mmap_lock(mapping) do { } while (0)
    -#define flush_dcache_mmap_unlock(mapping) do { } while (0)
    -#define flush_icache_range(start, end) do { } while (0)
    -#define flush_icache_page(vma, pg) do { } while (0)
    -#define flush_icache_user_range(vma, pg, adr, len) do { } while (0)
    -#define flush_cache_vmap(start, end) do { } while (0)
    -#define flush_cache_vunmap(start, end) do { } while (0)
    -
    -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
    - do { \
    - memcpy(dst, src, len); \
    - if (vma->vm_flags & VM_EXEC) \
    - sync_icache_dcache(page); \
    - } while (0)
    +#define flush_icache_user_range(vma, page, addr, len) \
    +do { \
    + if (vma->vm_flags & VM_EXEC) \
    + sync_icache_dcache(page); \
    +} while (0)

    -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
    - memcpy(dst, src, len)
    +#include <asm-generic/cacheflush.h>

    #endif /* __ASM_CACHEFLUSH_H */
    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-10 09:58    [W:3.151 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site