git: db562aeff775 - main - LinuxKPI: Implement clflush_cache_range()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Jan 2022 19:50:32 UTC
The branch main has been updated by wulf:
URL: https://cgit.FreeBSD.org/src/commit/?id=db562aeff7755a1128165cc0fbf8252756004847
commit db562aeff7755a1128165cc0fbf8252756004847
Author: Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-11-15 15:06:50 +0000
Commit: Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2022-01-10 19:49:36 +0000
LinuxKPI: Implement clflush_cache_range()
Required by drm-kmod 5.7
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33289
---
sys/compat/linuxkpi/common/include/linux/page.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h
index 7cdaf01dce03..ed1b562dba43 100644
--- a/sys/compat/linuxkpi/common/include/linux/page.h
+++ b/sys/compat/linuxkpi/common/include/linux/page.h
@@ -119,6 +119,13 @@ lkpi_clflushopt(unsigned long addr)
}
#define clflush(x) clflush((unsigned long)(x))
#define clflushopt(x) lkpi_clflushopt((unsigned long)(x))
+
+static inline void
+clflush_cache_range(void *addr, unsigned int size)
+{
+ pmap_force_invalidate_cache_range((vm_offset_t)addr,
+ (vm_offset_t)addr + size);
+}
#endif
#endif /* _LINUX_PAGE_H_ */