Browse Source

efDataPreprocessing basicAlgorithmEncapsulation.h 韩正义 commit at 2021-02-27

韩正义 4 years ago
parent
commit
02569c2a56
1 changed files with 20 additions and 0 deletions
  1. 20 0
      efDataPreprocessing/dataProcessing/basicAlgorithmEncapsulation.h

+ 20 - 0
efDataPreprocessing/dataProcessing/basicAlgorithmEncapsulation.h

@@ -294,3 +294,23 @@ extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr
  * Otherwise we can defer the operation, and clean the cache when we are
  * about to change to user space.  This is the same method as used on SPARC64.
  * See update_mmu_cache for the user space part.
+ */
+#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
+extern void flush_dcache_page(struct page *);
+
+static inline void flush_kernel_vmap_range(void *addr, int size)
+{
+	if ((cache_is_vivt() || cache_is_vipt_aliasing()))
+	  __cpuc_flush_dcache_area(addr, (size_t)size);
+}
+static inline void invalidate_kernel_vmap_range(void *addr, int size)
+{
+	if ((cache_is_vivt() || cache_is_vipt_aliasing()))
+	  __cpuc_flush_dcache_area(addr, (size_t)size);
+}
+
+#define ARCH_HAS_FLUSH_ANON_PAGE
+static inline void flush_anon_page(struct vm_area_struct *vma,
+			 struct page *page, unsigned long vmaddr)
+{
+	extern void __flush_anon_page(struct vm_area_struct *vma,