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);
 }