svn commit: r352388 - in stable/12/sys/compat/linuxkpi/common: include/linux src
Ed Maste
emaste at FreeBSD.org
Mon Sep 16 12:51:29 UTC 2019
Author: emaste
Date: Mon Sep 16 12:51:28 2019
New Revision: 352388
URL: https://svnweb.freebsd.org/changeset/base/352388
Log:
MFC r346445: 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>
Modified:
stable/12/sys/compat/linuxkpi/common/include/linux/io.h
stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linuxkpi/common/include/linux/io.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/io.h Mon Sep 16 12:44:44 2019 (r352387)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/io.h Mon Sep 16 12:51:28 2019 (r352388)
@@ -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: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Sep 16 12:44:44 2019 (r352387)
+++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Mon Sep 16 12:51:28 2019 (r352388)
@@ -1777,7 +1777,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)
{
@@ -1800,7 +1800,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-stable
mailing list