1 From: Stephan Schreiber <info@fs-driver.org>
2 Subject: xfree86: restore {in,out}{b,w,l} on linux/ia64
4 Call the equivalent glibc functions.
8 --- a/hw/xfree86/common/compiler.h
9 +++ b/hw/xfree86/common/compiler.h
10 @@ -438,6 +438,54 @@ extern _X_EXPORT unsigned int inl(unsign
11 #include <machine/pio.h>
12 #endif /* __NetBSD__ */
14 +#elif defined(linux) && defined(__ia64__)
15 +/* for Linux on ia64, we use the LIBC _inx/_outx routines */
16 +/* note that the appropriate setup via "ioperm" needs to be done */
17 +/* *before* any inx/outx is done. */
19 +extern _X_EXPORT void _outb(unsigned char val, unsigned long port);
20 +extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
21 +extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
22 +extern _X_EXPORT unsigned int _inb(unsigned long port);
23 +extern _X_EXPORT unsigned int _inw(unsigned long port);
24 +extern _X_EXPORT unsigned int _inl(unsigned long port);
26 +static __inline__ void
27 +outb(unsigned long port, unsigned char val)
32 +static __inline__ void
33 +outw(unsigned long port, unsigned short val)
38 +static __inline__ void
39 +outl(unsigned long port, unsigned int val)
44 +static __inline__ unsigned int
45 +inb(unsigned long port)
50 +static __inline__ unsigned int
51 +inw(unsigned long port)
56 +static __inline__ unsigned int
57 +inl(unsigned long port)
62 #elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)