mirror of
https://github.com/torvalds/linux
synced 2024-10-03 18:00:50 +00:00
e0cf615d72
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. [hch@lst.de: fix warning] Link: http://lkml.kernel.org/r/20200520173520.GA11199@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Will Deacon <will@kernel.org> Cc: Nick Piggin <npiggin@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Keith Busch <keith.busch@intel.com> Cc: Ira Weiny <ira.weiny@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Link: http://lkml.kernel.org/r/20200515143646.3857579-7-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
110 lines
2.2 KiB
C
110 lines
2.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_GENERIC_CACHEFLUSH_H
|
|
#define _ASM_GENERIC_CACHEFLUSH_H
|
|
|
|
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
|
|
|
|
/*
|
|
* The cache doesn't need to be flushed when TLB entries change when
|
|
* the cache is mapped to physical memory, not virtual memory
|
|
*/
|
|
#ifndef flush_cache_all
|
|
static inline void flush_cache_all(void)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_cache_mm
|
|
static inline void flush_cache_mm(struct mm_struct *mm)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_cache_dup_mm
|
|
static inline void flush_cache_dup_mm(struct mm_struct *mm)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_cache_range
|
|
static inline void flush_cache_range(struct vm_area_struct *vma,
|
|
unsigned long start,
|
|
unsigned long end)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_cache_page
|
|
static inline void flush_cache_page(struct vm_area_struct *vma,
|
|
unsigned long vmaddr,
|
|
unsigned long pfn)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_dcache_page
|
|
static inline void flush_dcache_page(struct page *page)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_dcache_mmap_lock
|
|
static inline void flush_dcache_mmap_lock(struct address_space *mapping)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_dcache_mmap_unlock
|
|
static inline void flush_dcache_mmap_unlock(struct address_space *mapping)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_icache_range
|
|
static inline void flush_icache_range(unsigned long start, unsigned long end)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_icache_page
|
|
static inline void flush_icache_page(struct vm_area_struct *vma,
|
|
struct page *page)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_icache_user_range
|
|
static inline void flush_icache_user_range(struct vm_area_struct *vma,
|
|
struct page *page,
|
|
unsigned long addr, int len)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_cache_vmap
|
|
static inline void flush_cache_vmap(unsigned long start, unsigned long end)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef flush_cache_vunmap
|
|
static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#ifndef copy_to_user_page
|
|
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
|
|
do { \
|
|
memcpy(dst, src, len); \
|
|
flush_icache_user_range(vma, page, vaddr, len); \
|
|
} while (0)
|
|
#endif
|
|
|
|
#ifndef copy_from_user_page
|
|
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
|
|
memcpy(dst, src, len)
|
|
#endif
|
|
|
|
#endif /* _ASM_GENERIC_CACHEFLUSH_H */
|