]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/s390_pci_mmio_write.2
libc.7: Add a note on why glibc 2.x uses the soname libc.so.6
[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 ",
18eff6b9 34.BI " void *" user_buffer ", size_t " length ");
a698082e
AI
35.br
36.BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
18eff6b9 37.BI " void *" user_buffer ", size_t " length ");
a698082e
AI
38.fi
39.SH DESCRIPTION
40The
41.BR s390_pci_mmio_write ()
18eff6b9 42system call writes
a698082e 43.IR length
18eff6b9 44bytes of data from the user-space buffer
a698082e 45.IR user_buffer
18eff6b9
MK
46to the PCI MMIO memory location specified by
47.IR mmio_addr .
a698082e
AI
48The
49.BR s390_pci_mmio_read ()
18eff6b9
MK
50system call reads
51.I length
52bytes of
53data from the PCI MMIO memory location specified by
54.IR mmio_addr
55to the user-space buffer
56.IR user_buffer .
a698082e
AI
57
58These system calls must be used instead of the simple assignment
18eff6b9
MK
59or data-transfer operations that are used to access the PCI MMIO
60memory areas mapped to user space on the Linux System z platform.
61The address specified by
a698082e 62.IR mmio_addr
18eff6b9
MK
63must belong to a PCI MMIO memory page mapping in the caller's address space,
64and the data being written or read must not cross a page boundary.
c1eb8ec5 65The
a698082e 66.IR length
18eff6b9 67value cannot be greater than the system page size.
a698082e
AI
68.SH RETURN VALUE
69On success,
70.BR s390_pci_mmio_write ()
71and
72.BR s390_pci_mmio_read ()
73return 0.
771e13d4 74On error, \-1 is returned and
a698082e
AI
75.IR errno
76is set to one of the error codes listed below.
77.SH ERRORS
78.TP
18eff6b9
MK
79.B EFAULT
80The address in
81.I mmio_addr
82is invalid.
83.TP
84.B EFAULT
85.IR user_buffer
86does not point to a valid location in the caller's address space.
87.TP
88.B EINVAL
89Invalid
90.I length
91argument.
92.TP
a698082e
AI
93.B ENODEV
94PCI support is not enabled.
95.TP
96.B ENOMEM
97Insufficient memory.
a698082e
AI
98.SH VERSIONS
99These system calls are available since Linux 3.19.
100.SH CONFORMING TO
c1eb8ec5
MK
101This Linux-specific system call is available only on the s390 architecture.
102The required PCI support is available beginning with System z EC12.
a698082e
AI
103.SH NOTES
104Glibc does not provide a wrapper for this system call, use
105.BR syscall (2)
106to call it.
107.SH SEE ALSO
108.BR syscall (2)