diff options
author | attilio <attilio@FreeBSD.org> | 2010-04-28 15:38:01 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2010-04-28 15:38:01 +0000 |
commit | 6dfd3f303086ff8e0db146c2e70c33de1a239696 (patch) | |
tree | fa18924d920e93a232bbaba63497b39499a9b76b /sys/ia64/include | |
parent | 60e1354e61b43b340b1c25761d1b3d5fbc35b000 (diff) | |
download | FreeBSD-src-6dfd3f303086ff8e0db146c2e70c33de1a239696.zip FreeBSD-src-6dfd3f303086ff8e0db146c2e70c33de1a239696.tar.gz |
- Extract the IODEV_PIO interface from ia64 and make it MI.
In the end, it does help fixing /dev/io usage from multithreaded
processes.
- 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, where
necessary, by the necessity to define very small things now.
Manpage update will happen shortly.
Sponsored by: Sandvine Incorporated
PR: threads/116181
Reviewed by: emaste, marcel
MFC after: 3 weeks
Diffstat (limited to 'sys/ia64/include')
-rw-r--r-- | sys/ia64/include/iodev.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/sys/ia64/include/iodev.h b/sys/ia64/include/iodev.h index 6d2ae19..cf349d9 100644 --- a/sys/ia64/include/iodev.h +++ b/sys/ia64/include/iodev.h @@ -31,22 +31,16 @@ #include <sys/uuid.h> -struct iodev_pio_req { - u_int access; -#define IODEV_PIO_READ 0 -#define IODEV_PIO_WRITE 1 - u_int port; - u_int width; - u_int val; -}; - -#define IODEV_PIO _IOWR('I', 0, struct iodev_pio_req) +#ifdef _KERNEL +#include <machine/bus.h> +#endif -struct iodev_efivar_req { - u_int access; #define IODEV_EFIVAR_GETVAR 0 #define IODEV_EFIVAR_NEXTNAME 1 #define IODEV_EFIVAR_SETVAR 2 + +struct iodev_efivar_req { + u_int access; u_int result; /* errno value */ size_t namesize; u_short *name; /* UCS-2 */ @@ -59,11 +53,16 @@ struct iodev_efivar_req { #define IODEV_EFIVAR _IOWR('I', 1, struct iodev_efivar_req) #ifdef _KERNEL +#define iodev_read_1 bus_space_read_io_1 +#define iodev_read_2 bus_space_read_io_2 +#define iodev_read_4 bus_space_read_io_4 +#define iodev_write_1 bus_space_write_io_1 +#define iodev_write_2 bus_space_write_io_2 +#define iodev_write_4 bus_space_write_io_4 -d_open_t ioopen; -d_close_t ioclose; -d_ioctl_t ioioctl; - -#endif +int iodev_open(struct thread *td); +int iodev_close(struct thread *td); +int iodev_ioctl(u_long, caddr_t data); +#endif /* _KERNEL */ #endif /* _MACHINE_IODEV_H_ */ |