2015-01-19 14:22:52 +00:00
|
|
|
.\" Copyright (c) IBM Corp. 2015
|
|
|
|
.\" Author: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
|
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
|
|
.\" the License, or (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" The GNU General Public License's references to "object code"
|
|
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
|
|
.\" document formatting or typesetting system, including
|
|
|
|
.\" intermediate and printed output.
|
|
|
|
.\"
|
|
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public
|
|
|
|
.\" License along with this manual; if not, see
|
|
|
|
.\" <http://www.gnu.org/licenses/>.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
|
|
|
.TH S390_PCI_MMIO_WRITE 2 2015-01-15 "Linux Programmer's Manual"
|
|
|
|
.SH NAME
|
|
|
|
s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI
|
|
|
|
MMIO memory page
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
|
|
|
.B #include <asm/unistd.h>
|
_syscall.2, clock_getres.2, clone.2, copy_file_range.2, create_module.2, delete_module.2, fallocate.2, futex.2, get_kernel_syms.2, get_robust_list.2, getcpu.2, getdents.2, gettid.2, gettimeofday.2, getunwind.2, init_module.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, link.2, llseek.2, memfd_create.2, mmap.2, mq_getsetattr.2, msgctl.2, msgget.2, open_by_handle_at.2, outb.2, perf_event_open.2, pivot_root.2, process_vm_readv.2, query_module.2, readdir.2, recvmmsg.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_setattr.2, seccomp.2, select.2, select_tut.2, send.2, sendmmsg.2, set_thread_area.2, set_tid_address.2, sgetmask.2, shmop.2, sigaction.2, sigprocmask.2, splice.2, spu_create.2, spu_run.2, statx.2, subpage_prot.2, sync_file_range.2, syscall.2, sysctl.2, sysfs.2, tee.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, tkill.2, uselib.2, utimensat.2, vmsplice.2, wait.2, aio_init.3, asinh.3, atan2.3, atanh.3, backtrace.3, basename.3, bswap.3, bzero.3, catgets.3, catopen.3, dladdr.3, dlsym.3, endian.3, envz_add.3, erf.3, erfc.3, error.3, ferror.3, ffs.3, fgetc.3, fmemopen.3, fopen.3, fopencookie.3, fseek.3, ftw.3, futimes.3, getdate.3, getenv.3, getline.3, getlogin.3, getrpcent.3, getsubopt.3, getutmp.3, getw.3, gnu_get_libc_version.3, inet_net_pton.3, isalpha.3, lio_listio.3, makedev.3, malloc_get_state.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, matherr.3, memchr.3, nextup.3, ntp_gettime.3, posix_madvise.3, program_invocation_name.3, pthread_atfork.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cleanup_push_defer_np.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_rwlockattr_setkind_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedprio.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, puts.3, random.3, random_r.3, rpc.3, sched_getcpu.3, setnetgrent.3, sigwait.3, stdin.3, strerror.3, strfmon.3, timeradd.3, tmpnam.3, toupper.3, towlower.3, towupper.3, ttyname.3, uselocale.3, xdr.3, dsp56k.4, sigevent.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-15 17:26:11 +00:00
|
|
|
.PP
|
2015-01-19 14:22:52 +00:00
|
|
|
.BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
|
2015-01-19 15:09:04 +00:00
|
|
|
.BI " void *" user_buffer ", size_t " length ");
|
2015-01-19 14:22:52 +00:00
|
|
|
.BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
|
2015-01-19 15:09:04 +00:00
|
|
|
.BI " void *" user_buffer ", size_t " length ");
|
2015-01-19 14:22:52 +00:00
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.BR s390_pci_mmio_write ()
|
2015-01-19 15:09:04 +00:00
|
|
|
system call writes
|
2015-01-19 14:22:52 +00:00
|
|
|
.IR length
|
2015-01-19 15:09:04 +00:00
|
|
|
bytes of data from the user-space buffer
|
2015-01-19 14:22:52 +00:00
|
|
|
.IR user_buffer
|
2015-01-19 15:09:04 +00:00
|
|
|
to the PCI MMIO memory location specified by
|
|
|
|
.IR mmio_addr .
|
2015-01-19 14:22:52 +00:00
|
|
|
The
|
|
|
|
.BR s390_pci_mmio_read ()
|
2015-01-19 15:09:04 +00:00
|
|
|
system call reads
|
|
|
|
.I length
|
|
|
|
bytes of
|
|
|
|
data from the PCI MMIO memory location specified by
|
|
|
|
.IR mmio_addr
|
|
|
|
to the user-space buffer
|
|
|
|
.IR user_buffer .
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.PP
|
2015-01-19 14:22:52 +00:00
|
|
|
These system calls must be used instead of the simple assignment
|
2015-01-19 15:09:04 +00:00
|
|
|
or data-transfer operations that are used to access the PCI MMIO
|
|
|
|
memory areas mapped to user space on the Linux System z platform.
|
|
|
|
The address specified by
|
2015-01-19 14:22:52 +00:00
|
|
|
.IR mmio_addr
|
2015-01-19 15:09:04 +00:00
|
|
|
must belong to a PCI MMIO memory page mapping in the caller's address space,
|
|
|
|
and the data being written or read must not cross a page boundary.
|
2015-01-19 15:02:03 +00:00
|
|
|
The
|
2015-01-19 14:22:52 +00:00
|
|
|
.IR length
|
2015-01-19 15:09:04 +00:00
|
|
|
value cannot be greater than the system page size.
|
2015-01-19 14:22:52 +00:00
|
|
|
.SH RETURN VALUE
|
|
|
|
On success,
|
|
|
|
.BR s390_pci_mmio_write ()
|
|
|
|
and
|
|
|
|
.BR s390_pci_mmio_read ()
|
|
|
|
return 0.
|
2015-01-22 22:36:33 +00:00
|
|
|
On error, \-1 is returned and
|
2015-01-19 14:22:52 +00:00
|
|
|
.IR errno
|
|
|
|
is set to one of the error codes listed below.
|
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
2015-01-19 15:09:04 +00:00
|
|
|
.B EFAULT
|
|
|
|
The address in
|
|
|
|
.I mmio_addr
|
|
|
|
is invalid.
|
|
|
|
.TP
|
|
|
|
.B EFAULT
|
|
|
|
.IR user_buffer
|
|
|
|
does not point to a valid location in the caller's address space.
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
Invalid
|
|
|
|
.I length
|
|
|
|
argument.
|
|
|
|
.TP
|
2015-01-19 14:22:52 +00:00
|
|
|
.B ENODEV
|
|
|
|
PCI support is not enabled.
|
|
|
|
.TP
|
|
|
|
.B ENOMEM
|
|
|
|
Insufficient memory.
|
|
|
|
.SH VERSIONS
|
|
|
|
These system calls are available since Linux 3.19.
|
|
|
|
.SH CONFORMING TO
|
2015-01-19 15:02:03 +00:00
|
|
|
This Linux-specific system call is available only on the s390 architecture.
|
|
|
|
The required PCI support is available beginning with System z EC12.
|
2015-01-19 14:22:52 +00:00
|
|
|
.SH NOTES
|
|
|
|
Glibc does not provide a wrapper for this system call, use
|
|
|
|
.BR syscall (2)
|
|
|
|
to call it.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR syscall (2)
|