Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178114338
D36022.1796004515.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
955 B
Referenced Files
None
Subscribers
None
D36022.1796004515.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 30, 2:08 AM (1 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42099199
Default Alt Text
D36022.1796004515.diff (955 B)
Attached To
Mode
D36022: linuxkpi: Add arch_io_{reserve,free}_memtype_wc
Attached
Detach File
Event Timeline