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
This commit is contained in:
Jean-Sébastien Pédron 2022-12-30 11:36:24 +01:00
parent 3aa335d00a
commit ed53e350d7
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC

View File

@ -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)