diff options
author | attilio <attilio@FreeBSD.org> | 2010-06-01 21:19:58 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2010-06-01 21:19:58 +0000 |
commit | 827618ec09d24ec70e60ed16c4e245b5fc3b7f76 (patch) | |
tree | 27988d5c1e3761cc1dd35db5ddbfbc0d3348b1e1 /sys/amd64/include | |
parent | 9db837f8de5be1248146ba60620322bd3600595c (diff) | |
download | FreeBSD-src-827618ec09d24ec70e60ed16c4e245b5fc3b7f76.zip FreeBSD-src-827618ec09d24ec70e60ed16c4e245b5fc3b7f76.tar.gz |
MFC r207329, r208716:
- Extract the IODEV_PIO interface from ia64 and make it MI.
- On i386 and amd64 the old behaviour is kept but multithreaded
processes must use the new interface in order to work well.
- Support for the other architectures is greatly improved.
Sponsored by: Sandvine Incorporated
Approved by: re (kib, bz)
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/iodev.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/amd64/include/iodev.h b/sys/amd64/include/iodev.h index 1a0a17a..9f53cac 100644 --- a/sys/amd64/include/iodev.h +++ b/sys/amd64/include/iodev.h @@ -25,7 +25,22 @@ * * $FreeBSD$ */ +#ifndef _MACHINE_IODEV_H_ +#define _MACHINE_IODEV_H_ -d_open_t ioopen; -d_close_t ioclose; -d_ioctl_t ioioctl; +#ifdef _KERNEL +#include <machine/cpufunc.h> + +#define iodev_read_1 inb +#define iodev_read_2 inw +#define iodev_read_4 inl +#define iodev_write_1 outb +#define iodev_write_2 outw +#define iodev_write_4 outl + +int iodev_open(struct thread *td); +int iodev_close(struct thread *td); +int iodev_ioctl(u_long cmd, caddr_t data); + +#endif /* _KERNEL */ +#endif /* _MACHINE_IODEV_H_ */ |