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
MFC after:	10 days
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D40173
This commit is contained in:
Bjoern A. Zeeb 2023-05-20 00:53:21 +00:00
parent 17bde9cbc6
commit 4cbd427788

View file

@ -403,6 +403,13 @@ _ioremap_attr(vm_paddr_t _phys_addr, unsigned long _size, int _attr)
}
#endif
struct device;
static inline void *
devm_ioremap(struct device *dev, resource_size_t offset, resource_size_t size)
{
return (NULL);
}
#ifdef VM_MEMATTR_DEVICE
#define ioremap_nocache(addr, size) \
_ioremap_attr((addr), (size), VM_MEMATTR_DEVICE)