s390_pci_mmio_read (2)
Leading comments
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 ...
NAME
s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI MMIO memory pageSYNOPSIS
#include <asm/unistd.h> int s390_pci_mmio_write(unsigned long mmio_addr, void *user_buffer, size_t length);
int s390_pci_mmio_read(unsigned long mmio_addr, void *user_buffer, size_t length);
DESCRIPTION
The s390_pci_mmio_write() system call writes length bytes of data from the user-space buffer user_buffer to the PCI MMIO memory location specified by mmio_addr. The s390_pci_mmio_read() system call reads length bytes of data from the PCI MMIO memory location specified by mmio_addr to the user-space buffer user_buffer.These system calls must be used instead of the simple assignment 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 mmio_addr 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. The length value cannot be greater than the system page size.
RETURN VALUE
On success, s390_pci_mmio_write() and s390_pci_mmio_read() return 0. On error, -1 is returned and errno is set to one of the error codes listed below.ERRORS
- EFAULT
- The address in mmio_addr is invalid.
- EFAULT
- user_buffer does not point to a valid location in the caller's address space.
- EINVAL
- Invalid length argument.
- ENODEV
- PCI support is not enabled.
- ENOMEM
- Insufficient memory.