diff options
author | hselasky <hselasky@FreeBSD.org> | 2016-05-23 11:53:00 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2016-05-23 11:53:00 +0000 |
commit | dee3f2f5b89f67413ddf9c2428610fb2848a586e (patch) | |
tree | e1cccee3b65810aeb8300e7a045a1eac2ce35e0c | |
parent | 6286c33bf78c2a37975c12d9974d71f46d2d973b (diff) | |
download | FreeBSD-src-dee3f2f5b89f67413ddf9c2428610fb2848a586e.zip FreeBSD-src-dee3f2f5b89f67413ddf9c2428610fb2848a586e.tar.gz |
Implement "_outb()" to the LinuxKPI for i386 and amd64 only.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/io.h | 8 |
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 d4376ef..f6c9405 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 |