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