]> git.ipfire.org Git - thirdparty/pciutils.git/blame - lib/i386-io-linux.h
Decoding of the Root Complex Link capability
[thirdparty/pciutils.git] / lib / i386-io-linux.h
CommitLineData
68245cfd
MM
1/*
2 * The PCI Library -- Access to i386 I/O ports on Linux
3 *
9007a292 4 * Copyright (c) 1997--2006 Martin Mares <mj@ucw.cz>
68245cfd
MM
5 *
6 * Can be freely distributed and used under the terms of the GNU GPL.
7 */
8
9#ifdef __GLIBC__
10#include <sys/io.h>
11#else
12#include <asm/io.h>
13#endif
14
68245cfd 15static int
d305d704 16intel_setup_io(struct pci_access *a UNUSED)
68245cfd 17{
9007a292 18 return (iopl(3) < 0) ? 0 : 1;
68245cfd
MM
19}
20
9007a292 21static inline int
d305d704 22intel_cleanup_io(struct pci_access *a UNUSED)
68245cfd 23{
9007a292
MM
24 iopl(3);
25 return -1;
68245cfd 26}