ring buffer: Use cpu_dcache_is_aliasing()
[lttng-modules.git] / src / lib / ringbuffer / ring_buffer_frontend.c
index 5316b7ff407196115726c2e33530978e17111b08..fbf3a16837c8574ebf6b90a2986d804626ba2d97 100644 (file)
@@ -1210,6 +1210,16 @@ static void lib_ring_buffer_flush_read_subbuf_dcache(
        if (config->output != RING_BUFFER_MMAP)
                return;
 
+#ifdef cpu_dcache_is_aliasing
+       /*
+        * Some architectures implement flush_dcache_page() but don't
+        * actually have aliasing dcache. cpu_dcache_is_aliasing() was
+        * introduced in kernel v6.9 to query this more precisely.
+        */
+       if (!cpu_dcache_is_aliasing())
+               return;
+#endif
+
        /*
         * Architectures with caches aliased on virtual addresses may
         * use different cache lines for the linear mapping vs
This page took 0.022885 seconds and 4 git commands to generate.