]> mj.ucw.cz Git - pciutils.git/commit
lib: Refactor access to x86 I/O ports
authorPali Rohár <pali@kernel.org>
Sun, 8 Oct 2023 13:10:12 +0000 (15:10 +0200)
committerGrant Pannell <300992+DigitalDJ@users.noreply.github.com>
Sat, 30 Dec 2023 15:26:49 +0000 (01:56 +1030)
commitcf930fa5ec551e2842a607cd299dd3c061b69d63
treefcd120f3f422987f199eaba6c46bee9492a6d04f
parent3d2d69cbc55016c4850ab7333de8e3884ec9d498
lib: Refactor access to x86 I/O ports

On all systems except BeOS and Haiku are x86 I/O ports accessed in the
standard way by the x86 in/out instructions.

On more systems there are wrapper functions for x86 in/out instructions but
under different names and sometimes even for same system those names
depends on user version of toolchain/compiler. And also some systems have
same function names but switched order of arguments.

Simplify this code, define own wrapper functions for x86 in/out
instructions in new header file i386-io-access.h and use it for every
platform except BeOS and Haiku.

This change simplifies Windows port, duplicated code between SunOS and
Windows and also tons of redefined port functions in every port.

To not conlict with possible system functions included from some header
file, add intel_ prefix for every function included from the file
lib/i386-io-access.h into lib/i386-ports.c
lib/i386-io-access.h [new file with mode: 0644]
lib/i386-io-beos.h
lib/i386-io-cygwin.h
lib/i386-io-djgpp.h
lib/i386-io-haiku.h
lib/i386-io-hurd.h
lib/i386-io-linux.h
lib/i386-io-sunos.h
lib/i386-io-windows.h
lib/i386-ports.c