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