aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/io.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-11-01 12:34:18 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-11-01 12:34:18 +0000
commit62d08fae1343da0e180f4a9a1c4e9e48c90bbb81 (patch)
treec9219d11359b9f15d40636554ec948f69846f924 /sys/compat/linuxkpi/common/include/linux/io.h
parentb37c654140e2c1e2ae49ce584da6879051536277 (diff)
downloadsrc-62d08fae1343da0e180f4a9a1c4e9e48c90bbb81.tar.gz
src-62d08fae1343da0e180f4a9a1c4e9e48c90bbb81.zip
Implement ioread16be() in the LinuxKPI.
MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=325279
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/io.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index a5891947a60e..1958b7aef5cd 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -109,6 +109,13 @@ ioread16(const volatile void *addr)
return *(const volatile uint16_t *)addr;
}
+#undef ioread16be
+static inline uint16_t
+ioread16be(const volatile void *addr)
+{
+ return be16toh(*(const volatile uint16_t *)addr);
+}
+
#undef ioread32
static inline uint32_t
ioread32(const volatile void *addr)