aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-10-23 14:52:05 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2015-10-23 14:52:05 +0000
commit63ec90e2128a984ba08bc3d8a9446c45e09e7f82 (patch)
treef9f12de4099d5f7d30507e1996eaed61a29fb2e7 /sys/ofed
parent5e74264452c44b6d88fd9b5f1133aa24ce16d4c1 (diff)
Notes
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/include/linux/linux_compat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ofed/include/linux/linux_compat.c b/sys/ofed/include/linux/linux_compat.c
index 038633e2d1ce..26df7db6ce93 100644
--- a/sys/ofed/include/linux/linux_compat.c
+++ b/sys/ofed/include/linux/linux_compat.c
@@ -663,7 +663,11 @@ _ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr)
{
void *addr;
+#if defined(__i386__) || defined(__amd64__)
addr = pmap_mapdev_attr(phys_addr, size, attr);
+#else
+ addr = NULL;
+#endif
if (addr == NULL)
return (NULL);
vmmap_add(addr, size);
@@ -679,7 +683,9 @@ iounmap(void *addr)
vmmap = vmmap_remove(addr);
if (vmmap == NULL)
return;
+#if defined(__i386__) || defined(__amd64__)
pmap_unmapdev((vm_offset_t)addr, vmmap->vm_size);
+#endif
kfree(vmmap);
}