svn commit: r346445 - in head/sys/compat/linuxkpi/common: include/linux src
Ed Maste
emaste at FreeBSD.org
Tue Sep 3 14:07:35 UTC 2019
Author: emaste
Date: Sat Apr 20 15:57:05 2019
New Revision: 346445
URL: https://svnweb.freebsd.org/changeset/base/346445
Log:
Enable ioremap for aarch64 in the LinuxKPI
Required for Mellanox drivers (e.g. on Ampere eMAG at Packet.com).
PR: 237055
Submitted by: Greg V <greg at unrelenting.technology>
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D19987
Modified:
head/sys/compat/linuxkpi/common/include/linux/io.h
head/sys/compat/linuxkpi/common/src/linux_compat.c
Modified: head/sys/compat/linuxkpi/common/include/linux/io.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/io.h Sat Apr 20 15:47:57 2019 (r346444)
+++ head/sys/compat/linuxkpi/common/include/linux/io.h Sat Apr 20 15:57:05 2019 (r346445)
@@ -350,7 +350,7 @@ _outb(u_char data, u_int port)
}
#endif
-#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__)
void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr);
#else
#define _ioremap_attr(...) NULL
Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c Sat Apr 20 15:47:57 2019 (r346444)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c Sat Apr 20 15:57:05 2019 (r346445)
@@ -1773,7 +1773,7 @@ vmmap_remove(void *addr)
return (vmmap);
}
-#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__)
void *
_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr)
{
@@ -1796,7 +1796,7 @@ iounmap(void *addr)
vmmap = vmmap_remove(addr);
if (vmmap == NULL)
return;
-#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__)
pmap_unmapdev((vm_offset_t)addr, vmmap->vm_size);
#endif
kfree(vmmap);
More information about the svn-src-head
mailing list