]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
Build fix for non-i386 and non-amd64 platforms.
authorhselasky <hselasky@FreeBSD.org>
Fri, 23 Oct 2015 14:52:05 +0000 (14:52 +0000)
committerhselasky <hselasky@FreeBSD.org>
Fri, 23 Oct 2015 14:52:05 +0000 (14:52 +0000)
Sponsored by: Mellanox Technologies

sys/ofed/include/linux/linux_compat.c

index 038633e2d1ce073d4dfb16968644fc8377ed7980..26df7db6ce9337e7a779fabee9de1080ef59829a 100644 (file)
@@ -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);
 }