Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2023 11:55:35 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 14b9db7ff854 - stable/13 - linuxkpi: Define `ioremap_cache()`
Message-ID:  <202302161155.31GBtZuM054753@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dumbbell (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=14b9db7ff85488fa5f85e8be2bdbe4e5ec0b3079

commit 14b9db7ff85488fa5f85e8be2bdbe4e5ec0b3079
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2022-12-30 10:36:24 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2023-02-16 11:55:10 +0000

    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
    
    (cherry picked from commit ed53e350d703b9e3ab78d137fd59a5a9dfef8b3f)
---
 sys/compat/linuxkpi/common/include/linux/io.h | 4 ++--
 1 file 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 7041710fe0c2..4eb69bca6141 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -420,7 +420,7 @@ void *_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);
 
@@ -492,7 +492,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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302161155.31GBtZuM054753>