aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/io.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2016-05-23 11:53:00 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2016-05-23 11:53:00 +0000
commit94a201be43f1661ca6855e5a38066161372340ed (patch)
treee1cccee3b65810aeb8300e7a045a1eac2ce35e0c /sys/compat/linuxkpi/common/include/linux/io.h
parented5f7812704cd0296ee9695037e869e000f9a881 (diff)
downloadsrc-94a201be43f1661ca6855e5a38066161372340ed.tar.gz
src-94a201be43f1661ca6855e5a38066161372340ed.zip
Implement "_outb()" to the LinuxKPI for i386 and amd64 only.
Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=300494
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/io.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index d4376efee78d..f6c9405f7c00 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -172,6 +172,14 @@ readl(const volatile void *addr)
}
#if defined(__i386__) || defined(__amd64__)
+static inline void
+_outb(u_char data, u_int port)
+{
+ __asm __volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
+}
+#endif
+
+#if defined(__i386__) || defined(__amd64__)
void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr);
#else
#define _ioremap_attr(...) NULL