aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2022-12-30 10:36:24 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2023-01-16 18:11:58 +0000
commited53e350d703b9e3ab78d137fd59a5a9dfef8b3f (patch)
tree0cd482ea02076c60a9452d55fee150bcfbfa8dbd
parent3aa335d00ac860565d106eb47e931206641cd653 (diff)
downloadsrc-ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f.tar.gz
src-ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f.zip
linuxkpi: Define `ioremap_cache()`
It uses the `VM_MEMATTR_WRITE_BACK` flag on FreeBSD. It replaces `ioremap_wb()` which doesn't exist in Linux. Perhaps it existed in the past and was removed. Reviewed by: emaste, manu Approved by: emaste, manu Differential Revision: https://reviews.freebsd.org/D37916
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index 64e8b294eeff..598ff8e0376d 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -424,7 +424,7 @@ _ioremap_attr(vm_paddr_t _phys_addr, unsigned long _size, int _attr)
#else
#define ioremap_wc(addr, size) ioremap_nocache(addr, size)
#endif
-#define ioremap_wb(addr, size) \
+#define ioremap_cache(addr, size) \
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK)
void iounmap(void *addr);
@@ -496,7 +496,7 @@ memremap(resource_size_t offset, size_t size, unsigned long flags)
void *addr = NULL;
if ((flags & MEMREMAP_WB) &&
- (addr = ioremap_wb(offset, size)) != NULL)
+ (addr = ioremap_cache(offset, size)) != NULL)
goto done;
if ((flags & MEMREMAP_WT) &&
(addr = ioremap_wt(offset, size)) != NULL)