OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / 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 2015-01-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
33 .BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
34 .BI "                        void *" user_buffer ", size_t " length ");
35 .br
36 .BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
37 .BI "                        void *" user_buffer ", size_t " length ");
38 .fi
39 .SH DESCRIPTION
40 The
41 .BR s390_pci_mmio_write ()
42 system call writes
43 .IR length
44 bytes of data from the user-space buffer
45 .IR user_buffer
46 to the PCI MMIO memory location specified by
47 .IR mmio_addr .
48 The
49 .BR s390_pci_mmio_read ()
50 system call reads
51 .I length
52 bytes of
53 data from the PCI MMIO memory location specified by
54 .IR mmio_addr
55 to the user-space buffer
56 .IR user_buffer .
57
58 These system calls must be used instead of the simple assignment
59 or data-transfer operations that are used to access the PCI MMIO
60 memory areas mapped to user space on the Linux System z platform.
61 The address specified by
62 .IR mmio_addr
63 must belong to a PCI MMIO memory page mapping in the caller's address space,
64 and the data being written or read must not cross a page boundary.
65 The
66 .IR length
67 value cannot be greater than the system page size.
68 .SH RETURN VALUE
69 On success,
70 .BR s390_pci_mmio_write ()
71 and
72 .BR s390_pci_mmio_read ()
73 return 0.
74 On error, \-1 is returned and
75 .IR errno
76 is set to one of the error codes listed below.
77 .SH ERRORS
78 .TP
79 .B EFAULT
80 The address in
81 .I mmio_addr
82 is invalid.
83 .TP
84 .B EFAULT
85 .IR user_buffer
86 does not point to a valid location in the caller's address space.
87 .TP
88 .B EINVAL
89 Invalid
90 .I length
91 argument.
92 .TP
93 .B ENODEV
94 PCI support is not enabled.
95 .TP
96 .B ENOMEM
97 Insufficient memory.
98 .SH VERSIONS
99 These system calls are available since Linux 3.19.
100 .SH CONFORMING TO
101 This Linux-specific system call is available only on the s390 architecture.
102 The required PCI support is available beginning with System z EC12.
103 .SH NOTES
104 Glibc does not provide a wrapper for this system call, use
105 .BR syscall (2)
106 to call it.
107 .SH SEE ALSO
108 .BR syscall (2)
109 .SH COLOPHON
110 This page is part of release 3.79 of the Linux
111 .I man-pages
112 project.
113 A description of the project,
114 information about reporting bugs,
115 and the latest version of this page,
116 can be found at
117 \%http://www.kernel.org/doc/man\-pages/.