git: 6faade07b16b - stable/13 - LinuxKPI: add devm_ioremap()

From: Bjoern A. Zeeb <>
Date: Mon, 26 Jun 2023 12:09:01 UTC
The branch stable/13 has been updated by bz:


commit 6faade07b16bfb0bfbe5ee02595a0705a797274d
Author:     Bjoern A. Zeeb <>
AuthorDate: 2023-05-20 00:53:21 +0000
Commit:     Bjoern A. Zeeb <>
CommitDate: 2023-06-26 09:25:42 +0000

    LinuxKPI: add devm_ioremap()
    Given we do not seem to support ioremap() do not support the "devm"
    version either and simply return NULL, which means we do not have
    to keep track of the memory to be freed on device free later.
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    hselasky
    Differential Revision:
    (cherry picked from commit 4cbd427788ec625f17c1ecdfccbb7b06c1c908d9)
 sys/compat/linuxkpi/common/include/linux/io.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index 4eb69bca6141..2a63af5d61bf 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -399,6 +399,13 @@ void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr);
 #define	_ioremap_attr(...) NULL
+struct device;
+static inline void *
+devm_ioremap(struct device *dev, resource_size_t offset, resource_size_t size)
+	return (NULL);
 #define	ioremap_nocache(addr, size)					\
     _ioremap_attr((addr), (size), VM_MEMATTR_DEVICE)