Page MenuHomeFreeBSD

D36022.diff
No OneTemporary

D36022.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -38,6 +38,7 @@
#include <linux/compiler.h>
#include <linux/types.h>
+#include <asm/set_memory.h>
/*
* XXX This is all x86 specific. It should be bus space access.
@@ -494,4 +495,19 @@
#define arch_phys_wc_index(x) \
(((x) < __MTRR_ID_BASE) ? -1 : ((x) - __MTRR_ID_BASE))
+#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__) || defined(__powerpc__) || defined(__riscv)
+static inline int
+arch_io_reserve_memtype_wc(resource_size_t start, resource_size_t size)
+{
+
+ return (set_memory_wc(start, size >> PAGE_SHIFT));
+}
+
+static inline void
+arch_io_free_memtype_wc(resource_size_t start, resource_size_t size)
+{
+ set_memory_wb(start, size >> PAGE_SHIFT);
+}
+#endif
+
#endif /* _LINUXKPI_LINUX_IO_H_ */

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 9:30 AM (2 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35359308
Default Alt Text
D36022.diff (955 B)

Event Timeline