]> exis.tech > repos - linux.git/blobdiff - arch/riscv/include/asm/cacheflush.h
Merge tag 'hwmon-for-v7.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
[linux.git] / arch / riscv / include / asm / cacheflush.h
index 8cfe59483a8f28c29b35e54fa2584e6bfb58760f..c2b0a2928f06743e59485e165b9edf976b84212e 100644 (file)
@@ -40,7 +40,7 @@ do {                                                  \
                flush_icache_mm(vma->vm_mm, 0);         \
 } while (0)
 
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_64BIT) && defined(CONFIG_MMU)
 /* This is accessed in assembly code. cpumask_var_t would be too complex. */
 extern DECLARE_BITMAP(new_valid_map_cpus, NR_CPUS);
 extern char _end[];
@@ -56,7 +56,8 @@ static inline void mark_new_valid_map(void)
 #define flush_cache_vmap flush_cache_vmap
 static inline void flush_cache_vmap(unsigned long start, unsigned long end)
 {
-       if (is_vmalloc_or_module_addr((void *)start))
+       if (is_vmalloc_or_module_addr((void *)start) ||
+           (start >= VMEMMAP_START && end <= VMEMMAP_END))
                mark_new_valid_map();
 }
 #define flush_cache_vmap_early(start, end)     local_flush_tlb_kernel_range(start, end)