Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 11:53:01 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300494 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201605231153.u4NBr1M8007951@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605231153.u4NBr1M8007951>