Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163246326
D36022.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
955 B
Referenced Files
None
Subscribers
None
D36022.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
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)
Attached To
Mode
D36022: linuxkpi: Add arch_io_{reserve,free}_memtype_wc
Attached
Detach File
Event Timeline
Log In to Comment