Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167410125
D36022.id108819.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
964 B
Referenced Files
None
Subscribers
None
D36022.id108819.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/io.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/io.h
+++ 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
Sat, Aug 22, 2:49 PM (16 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37038858
Default Alt Text
D36022.id108819.diff (964 B)
Attached To
Mode
D36022: linuxkpi: Add arch_io_{reserve,free}_memtype_wc
Attached
Detach File
Event Timeline
Log In to Comment