svn commit: r300494 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Mon May 23 11:53:02 UTC 2016


Author: hselasky
Date: Mon May 23 11:53:00 2016
New Revision: 300494
URL: https://svnweb.freebsd.org/changeset/base/300494

Log:
  Implement "_outb()" to the LinuxKPI for i386 and amd64 only.
  
  Obtained from:	kmacy @
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/io.h

Modified: head/sys/compat/linuxkpi/common/include/linux/io.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/io.h	Mon May 23 11:50:05 2016	(r300493)
+++ head/sys/compat/linuxkpi/common/include/linux/io.h	Mon May 23 11:53:00 2016	(r300494)
@@ -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


More information about the svn-src-head mailing list