Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2022 19:50:32 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: db562aeff775 - main - LinuxKPI: Implement clflush_cache_range()
Message-ID:  <202201101950.20AJoW4L005120@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201101950.20AJoW4L005120>