Skip to content

Commit 76b3b58

Browse files
Christoph Hellwigtorvalds
authored andcommitted
asm-generic: improve the flush_dcache_page stub
There is a magic ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE cpp symbol that guards non-stub availability of flush_dcache_pagge. Use that to check if flush_dcache_pagg is implemented. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de> Link: http://lkml.kernel.org/r/20200515143646.3857579-8-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e0cf615 commit 76b3b58

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎include/asm-generic/cacheflush.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef _ASM_GENERIC_CACHEFLUSH_H
33
#define _ASM_GENERIC_CACHEFLUSH_H
44

5-
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
6-
75
/*
86
* The cache doesn't need to be flushed when TLB entries change when
97
* the cache is mapped to physical memory, not virtual memory
@@ -42,12 +40,14 @@ static inline void flush_cache_page(struct vm_area_struct *vma,
4240
}
4341
#endif
4442

45-
#ifndef flush_dcache_page
43+
#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
4644
static inline void flush_dcache_page(struct page *page)
4745
{
4846
}
47+
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
4948
#endif
5049

50+
5151
#ifndef flush_dcache_mmap_lock
5252
static inline void flush_dcache_mmap_lock(struct address_space *mapping)
5353
{

0 commit comments

Comments
 (0)