mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Many architectures do not include asm-generic/cacheflush.h, so turn
the includes on their head and add linux/cacheflush.h which includes
asm/cacheflush.h.
Move the flush_dcache_folio() declaration from asm-generic/cacheflush.h
to linux/cacheflush.h and change linux/highmem.h to include
linux/cacheflush.h instead of asm/cacheflush.h so that all necessary
places will see flush_dcache_folio().
More functions should have their default implementations moved in the
future, but those are for follow-on patches. This fixes csky, sparc and
sparc64 which were missed in the commit which added flush_dcache_folio().
Fixes: 08b0b0059b
("mm: Add flush_dcache_folio()")
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
53 lines
1.9 KiB
C
53 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
// Copyright (C) 2005-2017 Andes Technology Corporation
|
|
|
|
#ifndef __NDS32_CACHEFLUSH_H__
|
|
#define __NDS32_CACHEFLUSH_H__
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#define PG_dcache_dirty PG_arch_1
|
|
|
|
void flush_icache_range(unsigned long start, unsigned long end);
|
|
#define flush_icache_range flush_icache_range
|
|
|
|
void flush_icache_page(struct vm_area_struct *vma, struct page *page);
|
|
#define flush_icache_page flush_icache_page
|
|
|
|
#ifdef CONFIG_CPU_CACHE_ALIASING
|
|
void flush_cache_mm(struct mm_struct *mm);
|
|
void flush_cache_dup_mm(struct mm_struct *mm);
|
|
void flush_cache_range(struct vm_area_struct *vma,
|
|
unsigned long start, unsigned long end);
|
|
void flush_cache_page(struct vm_area_struct *vma,
|
|
unsigned long addr, unsigned long pfn);
|
|
void flush_cache_kmaps(void);
|
|
void flush_cache_vmap(unsigned long start, unsigned long end);
|
|
void flush_cache_vunmap(unsigned long start, unsigned long end);
|
|
|
|
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
|
|
void flush_dcache_page(struct page *page);
|
|
void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
|
|
unsigned long vaddr, void *dst, void *src, int len);
|
|
void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
|
|
unsigned long vaddr, void *dst, void *src, int len);
|
|
|
|
#define ARCH_HAS_FLUSH_ANON_PAGE
|
|
void flush_anon_page(struct vm_area_struct *vma,
|
|
struct page *page, unsigned long vaddr);
|
|
|
|
#define ARCH_IMPLEMENTS_FLUSH_KERNEL_VMAP_RANGE 1
|
|
void flush_kernel_vmap_range(void *addr, int size);
|
|
void invalidate_kernel_vmap_range(void *addr, int size);
|
|
#define flush_dcache_mmap_lock(mapping) xa_lock_irq(&(mapping)->i_pages)
|
|
#define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&(mapping)->i_pages)
|
|
|
|
#else
|
|
void flush_icache_user_page(struct vm_area_struct *vma, struct page *page,
|
|
unsigned long addr, int len);
|
|
#define flush_icache_user_page flush_icache_user_page
|
|
|
|
#include <asm-generic/cacheflush.h>
|
|
#endif
|
|
|
|
#endif /* __NDS32_CACHEFLUSH_H__ */
|