summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/cpufunc.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-07-23 20:28:23 +0000
committerphk <phk@FreeBSD.org>2003-07-23 20:28:23 +0000
commit585a2cb0b667c47ab8b74866b3b38919a9d4f4cb (patch)
treead83db87aa578af5dc6073ab2eda2cca63f48f9c /sys/i386/include/cpufunc.h
parent928703e4b60bc3e4973aa00f0c2156e73d5cb9db (diff)
downloadFreeBSD-src-585a2cb0b667c47ab8b74866b3b38919a9d4f4cb.zip
FreeBSD-src-585a2cb0b667c47ab8b74866b3b38919a9d4f4cb.tar.gz
Stop GCC from whining when people use a 16 bit port number for inb() and outb()
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r--sys/i386/include/cpufunc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index c7f9ace..d2cfdf6 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -157,7 +157,7 @@ halt(void)
#define inb(port) __extension__ ({ \
u_char _data; \
if (__builtin_constant_p(port) && ((port) & 0xffff) < 0x100 \
- && (port) < 0x10000) \
+ && (0x10000 + (port)) < 0x20000) \
_data = inbc(port); \
else \
_data = inbv(port); \
@@ -165,7 +165,7 @@ halt(void)
#define outb(port, data) ( \
__builtin_constant_p(port) && ((port) & 0xffff) < 0x100 \
- && (port) < 0x10000 \
+ && (0x10000 + (port)) < 0x20000 \
? outbc(port, data) : outbv(port, data))
static __inline u_char
OpenPOWER on IntegriCloud