]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/s390_pci_mmio_write.2
s390_pci_mmio_write.2: srcfix
[thirdparty/man-pages.git] / man2 / s390_pci_mmio_write.2
CommitLineData
a698082e
AI
1.\" Copyright (c) IBM Corp. 2015
2.\" Author: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com>
3.\"
4.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5.\" This is free documentation; you can redistribute it and/or
6.\" modify it under the terms of the GNU General Public License as
7.\" published by the Free Software Foundation; either version 2 of
8.\" the License, or (at your option) any later version.
9.\"
10.\" The GNU General Public License's references to "object code"
11.\" and "executables" are to be interpreted as the output of any
12.\" document formatting or typesetting system, including
13.\" intermediate and printed output.
14.\"
15.\" This manual is distributed in the hope that it will be useful,
16.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18.\" GNU General Public License for more details.
19.\"
20.\" You should have received a copy of the GNU General Public
21.\" License along with this manual; if not, see
22.\" <http://www.gnu.org/licenses/>.
23.\" %%%LICENSE_END
24.\"
25.TH S390_PCI_MMIO_WRITE 2 2015-01-15 "Linux Programmer's Manual"
26.SH NAME
27s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI
28MMIO memory page
29.SH SYNOPSIS
30.nf
31.B #include <asm/unistd.h>
32
33.BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
34.BI " void *" user_buffer ",
35.BI " size_t " length ");
36.br
37.BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
38.BI " void *" user_buffer ",
39.BI " size_t " length ");
40.fi
41.SH DESCRIPTION
42The
43.BR s390_pci_mmio_write ()
44system call writes data of length
45.IR length
46from the user space buffer
47.IR user_buffer
48to a PCI MMIO memory location.
49The
50.BR s390_pci_mmio_read ()
51system call reads data from a PCI MMIO memory location
52to the user space buffer
53.IR user_buffer
54of
55.IR length
56bytes size.
57
58These system calls must be used instead of the simple assignment
59or data transfer operations that are used to access the PCI MMIO
c1eb8ec5 60memory areas mapped to the user space on the Linux on System z platform.
a698082e
AI
61The address specified by the
62.IR mmio_addr
63parameter must belong to a PCI MMIO memory page mapping in the user
64address space, and the data being written or read must not cross a
c1eb8ec5
MK
65page boundary.
66The
a698082e
AI
67.IR length
68parameter value cannot be greater than the page size.
69.SH RETURN VALUE
70On success,
71.BR s390_pci_mmio_write ()
72and
73.BR s390_pci_mmio_read ()
74return 0.
75On error, \-1 is returned and
76.IR errno
77is set to one of the error codes listed below.
78.SH ERRORS
79.TP
80.B ENODEV
81PCI support is not enabled.
82.TP
83.B ENOMEM
84Insufficient memory.
85.TP
86.B EFAULT
87Invalid address was specified.
88.TP
89.B EINVAL
90Invalid parameter value.
91.SH VERSIONS
92These system calls are available since Linux 3.19.
93.SH CONFORMING TO
c1eb8ec5
MK
94This Linux-specific system call is available only on the s390 architecture.
95The required PCI support is available beginning with System z EC12.
a698082e
AI
96.SH NOTES
97Glibc does not provide a wrapper for this system call, use
98.BR syscall (2)
99to call it.
100.SH SEE ALSO
101.BR syscall (2)