From: Hanjun Guo guohanjun@huawei.com
hulk inclusion category: feature bugzilla: 46503 CVE: NA
---------------------------
Adding flush_dcache_area() for module use, and export __flush_dcache_area() for that purpose.
Signed-off-by: Hanjun Guo guohanjun@huawei.com --- arch/arm64/include/asm/cacheflush.h | 6 ++++++ arch/arm64/mm/flush.c | 1 + 2 files changed, 7 insertions(+)
diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h index 9384fd8fc13c..c7da50bd45be 100644 --- a/arch/arm64/include/asm/cacheflush.h +++ b/arch/arm64/include/asm/cacheflush.h @@ -96,6 +96,12 @@ static inline void flush_icache_range(unsigned long start, unsigned long end) } #define flush_icache_range flush_icache_range
+static inline void flush_dcache_area(void *addr, size_t len) +{ + __flush_dcache_area(addr, len); +} +#define flush_dcache_area flush_dcache_area + /* * Cache maintenance functions used by the DMA API. No to be used directly. */ diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c index ac485163a4a7..5bddfbeeec56 100644 --- a/arch/arm64/mm/flush.c +++ b/arch/arm64/mm/flush.c @@ -76,6 +76,7 @@ EXPORT_SYMBOL(flush_dcache_page); * Additional functions defined in assembly. */ EXPORT_SYMBOL(__flush_icache_range); +EXPORT_SYMBOL(__flush_dcache_area);
#ifdef CONFIG_ARCH_HAS_PMEM_API void arch_wb_cache_pmem(void *addr, size_t size)