linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Manual page for new PCI memory access system calls
@ 2015-01-19 14:22 Alexey Ishchuk
       [not found] ` <1421677372-15088-1-git-send-email-aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Ishchuk @ 2015-01-19 14:22 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA
  Cc: blaschka-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	schwidefsky-tA70FqPdS9bQT0dZR+AlfA,
	heicars2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, Alexey Ishchuk

Add s390_pci_mmio_write.2 manual page for the new PCI MMIO memory access
s390_pci_mmio_write () and s390_pci_mmio_read () system calls added for
the s390 platform.

Signed-off-by: Alexey Ishchuk <aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 man2/s390_pci_mmio_write.2 | 102 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 man2/s390_pci_mmio_write.2

diff --git a/man2/s390_pci_mmio_write.2 b/man2/s390_pci_mmio_write.2
new file mode 100644
index 0000000..4757be2
--- /dev/null
+++ b/man2/s390_pci_mmio_write.2
@@ -0,0 +1,102 @@
+.\" Copyright (c) IBM Corp. 2015
+.\" Author: Alexey Ishchuk <aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
+.\"
+.\" %%%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>
+
+.BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
+.BI "                     void *" user_buffer ",
+.BI "                     size_t " length ");
+.br
+.BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
+.BI "                    void *" user_buffer ",
+.BI "                    size_t " length ");
+.fi
+.SH DESCRIPTION
+The
+.BR s390_pci_mmio_write ()
+system call writes data of length
+.IR length
+from the user space buffer
+.IR user_buffer
+to a PCI MMIO memory location.
+The
+.BR s390_pci_mmio_read ()
+system call reads data from a PCI MMIO memory location
+to the user space buffer
+.IR user_buffer
+of
+.IR length
+bytes size.
+
+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 the user space on the Linux on System z
+platform.
+The address specified by the
+.IR mmio_addr
+parameter must belong to a PCI MMIO memory page mapping in the user
+address space, and the data being written or read must not cross a
+page boundary. The
+.IR length
+parameter value cannot be greater than the page size.
+.SH RETURN VALUE
+On success,
+.BR s390_pci_mmio_write ()
+and
+.BR s390_pci_mmio_read ()
+return 0.
+On error, \-1 is returned and 
+.IR errno
+is set to one of the error codes listed below.
+.SH ERRORS
+.TP
+.B ENODEV
+PCI support is not enabled.
+.TP
+.B ENOMEM
+Insufficient memory.
+.TP
+.B EFAULT
+Invalid address was specified.
+.TP
+.B EINVAL
+Invalid parameter value.
+.SH VERSIONS
+These system calls are available since Linux 3.19.
+.SH CONFORMING TO
+This Linux-specific system call is available only on the s390
+architecture. The required PCI support is available beginning with
+System z EC12.
+.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)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Manual page for new PCI memory access system calls
       [not found] ` <1421677372-15088-1-git-send-email-aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2015-01-19 15:25   ` Michael Kerrisk (man-pages)
       [not found]     ` <54BD21FC.1000602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-01-19 15:25 UTC (permalink / raw)
  To: Alexey Ishchuk, linux-man-u79uwXL29TY76Z2rM5mHXA
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	blaschka-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	schwidefsky-tA70FqPdS9bQT0dZR+AlfA,
	heicars2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Hello Alexey,

On 01/19/2015 03:22 PM, Alexey Ishchuk wrote:
> Add s390_pci_mmio_write.2 manual page for the new PCI MMIO memory access
> s390_pci_mmio_write () and s390_pci_mmio_read () system calls added for
> the s390 platform.

I've applied this patch. I made a few tweaks to the text, and hopefully 
I did not inject any errors. Could you please check the version below.

One question: do I understand correctly that mmio_addr
is a physical address? Maybe we should say mention that in
the page.

Cheers,

Michael

.\" Copyright (c) IBM Corp. 2015
.\" Author: Alexey Ishchuk <aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
.\"
.\" %%%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>

.BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
.BI "                        void *" user_buffer ", size_t " length ");
.br
.BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
.BI "                        void *" user_buffer ", size_t " length ");
.fi
.SH DESCRIPTION
The
.BR s390_pci_mmio_write ()
system call writes
.IR length
bytes of data from the user-space buffer
.IR user_buffer
to the PCI MMIO memory location specified by
.IR mmio_addr .
The
.BR s390_pci_mmio_read ()
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 .

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
.IR 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
.IR length
value cannot be greater than the system page size.
.SH RETURN VALUE
On success,
.BR s390_pci_mmio_write ()
and
.BR s390_pci_mmio_read ()
return 0.
On error, \-1 is returned and 
.IR errno
is set to one of the error codes listed below.
.SH ERRORS
.TP
.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
.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
This Linux-specific system call is available only on the s390 architecture.
The required PCI support is available beginning with System z EC12.
.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)

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Manual page for new PCI memory access system calls
       [not found]     ` <54BD21FC.1000602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-01-20 13:49       ` Alexey Ishchuk
       [not found]         ` <54BE5CCD.2060803-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Ishchuk @ 2015-01-20 13:49 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages), linux-man-u79uwXL29TY76Z2rM5mHXA
  Cc: blaschka-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	schwidefsky-tA70FqPdS9bQT0dZR+AlfA,
	heicars2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Hello Michael,

the mmio_addr parameter value must belong to the user space memory area 
of a PCI MMIO page mapping to the user space. It is a logical user space 
address value which is translated to an appropriate physical address 
inside these system calls. This is mentioned in the system call 
description text, and, I think, we don't need to give additional details.

Your changes to the text look good. Thank you!

Best regards,
Alexey

On 19.01.2015 18:25, Michael Kerrisk (man-pages) wrote:
> Hello Alexey,
>
> On 01/19/2015 03:22 PM, Alexey Ishchuk wrote:
>> Add s390_pci_mmio_write.2 manual page for the new PCI MMIO memory access
>> s390_pci_mmio_write () and s390_pci_mmio_read () system calls added for
>> the s390 platform.
>
> I've applied this patch. I made a few tweaks to the text, and hopefully
> I did not inject any errors. Could you please check the version below.
>
> One question: do I understand correctly that mmio_addr
> is a physical address? Maybe we should say mention that in
> the page.
>
> Cheers,
>
> Michael
>
> .\" Copyright (c) IBM Corp. 2015
> .\" Author: Alexey Ishchuk <aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> .\"
> .\" %%%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>
>
> .BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
> .BI "                        void *" user_buffer ", size_t " length ");
> .br
> .BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
> .BI "                        void *" user_buffer ", size_t " length ");
> .fi
> .SH DESCRIPTION
> The
> .BR s390_pci_mmio_write ()
> system call writes
> .IR length
> bytes of data from the user-space buffer
> .IR user_buffer
> to the PCI MMIO memory location specified by
> .IR mmio_addr .
> The
> .BR s390_pci_mmio_read ()
> 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 .
>
> 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
> .IR 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
> .IR length
> value cannot be greater than the system page size.
> .SH RETURN VALUE
> On success,
> .BR s390_pci_mmio_write ()
> and
> .BR s390_pci_mmio_read ()
> return 0.
> On error, \-1 is returned and
> .IR errno
> is set to one of the error codes listed below.
> .SH ERRORS
> .TP
> .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
> .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
> This Linux-specific system call is available only on the s390 architecture.
> The required PCI support is available beginning with System z EC12.
> .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)
>

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Manual page for new PCI memory access system calls
       [not found]         ` <54BE5CCD.2060803-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2015-01-20 14:18           ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-01-20 14:18 UTC (permalink / raw)
  To: Alexey Ishchuk
  Cc: linux-man, blaschka-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8,
	Martin Schwidefsky, heicars2-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Hello Alexey,

On 20 January 2015 at 14:49, Alexey Ishchuk <aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
> Hello Michael,
>
> the mmio_addr parameter value must belong to the user space memory area of a
> PCI MMIO page mapping to the user space. It is a logical user space address
> value which is translated to an appropriate physical address inside these
> system calls. This is mentioned in the system call description text, and, I
> think, we don't need to give additional details.

Ahh yes, you're right. I overlooked that somehow.

> Your changes to the text look good. Thank you!

Thanks for checking!

Cheers,

Michael


>> Hello Alexey,
>>
>> On 01/19/2015 03:22 PM, Alexey Ishchuk wrote:
>>>
>>> Add s390_pci_mmio_write.2 manual page for the new PCI MMIO memory access
>>> s390_pci_mmio_write () and s390_pci_mmio_read () system calls added for
>>> the s390 platform.
>>
>>
>> I've applied this patch. I made a few tweaks to the text, and hopefully
>> I did not inject any errors. Could you please check the version below.
>>
>> One question: do I understand correctly that mmio_addr
>> is a physical address? Maybe we should say mention that in
>> the page.
>>
>> Cheers,
>>
>> Michael
>>
>> .\" Copyright (c) IBM Corp. 2015
>> .\" Author: Alexey Ishchuk <aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> .\"
>> .\" %%%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>
>>
>> .BI "int s390_pci_mmio_write(unsigned long " mmio_addr ",
>> .BI "                        void *" user_buffer ", size_t " length ");
>> .br
>> .BI "int s390_pci_mmio_read(unsigned long " mmio_addr ",
>> .BI "                        void *" user_buffer ", size_t " length ");
>> .fi
>> .SH DESCRIPTION
>> The
>> .BR s390_pci_mmio_write ()
>> system call writes
>> .IR length
>> bytes of data from the user-space buffer
>> .IR user_buffer
>> to the PCI MMIO memory location specified by
>> .IR mmio_addr .
>> The
>> .BR s390_pci_mmio_read ()
>> 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 .
>>
>> 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
>> .IR 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
>> .IR length
>> value cannot be greater than the system page size.
>> .SH RETURN VALUE
>> On success,
>> .BR s390_pci_mmio_write ()
>> and
>> .BR s390_pci_mmio_read ()
>> return 0.
>> On error, \-1 is returned and
>> .IR errno
>> is set to one of the error codes listed below.
>> .SH ERRORS
>> .TP
>> .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
>> .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
>> This Linux-specific system call is available only on the s390
>> architecture.
>> The required PCI support is available beginning with System z EC12.
>> .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)
>>
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-20 14:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 14:22 [PATCH] Manual page for new PCI memory access system calls Alexey Ishchuk
     [not found] ` <1421677372-15088-1-git-send-email-aishchuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2015-01-19 15:25   ` Michael Kerrisk (man-pages)
     [not found]     ` <54BD21FC.1000602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-20 13:49       ` Alexey Ishchuk
     [not found]         ` <54BE5CCD.2060803-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2015-01-20 14:18           ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).