All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] rename.2: ffix
@ 2021-05-15 18:20 Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 2/8] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/rename.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/rename.2 b/man2/rename.2
index c83ef08a1..04a183d84 100644
--- a/man2/rename.2
+++ b/man2/rename.2
@@ -39,7 +39,7 @@ rename, renameat, renameat2 \- change the name or location of a file
 .PP
 .BI "int rename(const char *" oldpath ", const char *" newpath );
 .PP
-.BR "#include <fcntl.h>           " "/* Definition of AT_* constants */"
+.BR "#include <fcntl.h>           " "/* Definition of " AT_* " constants */"
 .B #include <stdio.h>
 .PP
 .BI "int renameat(int " olddirfd ", const char *" oldpath ,
-- 
2.31.1


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

* [PATCH 2/8] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 3/8] s390_guarded_storage.2: " Alejandro Colomar
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/rt_sigqueueinfo.2 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/man2/rt_sigqueueinfo.2 b/man2/rt_sigqueueinfo.2
index 2dd1a5877..d48ecbdcd 100644
--- a/man2/rt_sigqueueinfo.2
+++ b/man2/rt_sigqueueinfo.2
@@ -27,9 +27,14 @@
 rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
 .SH SYNOPSIS
 .nf
-.BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" info );
-.BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig \
-", siginfo_t *" info );
+.BR "#include <linux/signal.h>" "     /* Definition of " SI_* " constants */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_rt_sigqueueinfo, pid_t " tgid ,
+.BI "            int " sig ", siginfo_t *" info );
+.BI "int syscall(SYS_rt_tgsigqueueinfo, pid_t " tgid ", pid_t " tid ,
+.BI "            int " sig ", siginfo_t *" info );
 .fi
 .PP
 .IR Note :
-- 
2.31.1


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

* [PATCH 3/8] s390_guarded_storage.2: Use syscall(SYS_...); for system calls without a wrapper
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 2/8] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 4/8] s390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too Alejandro Colomar
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

Also document why each header is needed.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/s390_guarded_storage.2 | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/man2/s390_guarded_storage.2 b/man2/s390_guarded_storage.2
index 1d4cb5777..747c45c3a 100644
--- a/man2/s390_guarded_storage.2
+++ b/man2/s390_guarded_storage.2
@@ -27,13 +27,20 @@
 s390_guarded_storage \- operations with z/Architecture guarded storage facility
 .SH SYNOPSIS
 .nf
-.B #include <asm/guarded_storage.h>
+.BR "#include <asm/guarded_storage.h> " "/* Definition of " GS_* " constants */"
+.BR "#include <sys/syscall.h>         " \
+"/* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int s390_guarded_storage(int " command ", struct gs_cb *" gs_cb ");"
+.BI "int syscall(SYS_s390_guarded_storage, int " command ,
+.BI "            struct gs_cb *" gs_cb );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR s390_guarded_storage (2),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 The
 .BR s390_guarded_storage ()
@@ -144,9 +151,6 @@ This Linux-specific system call is available only on the s390 architecture.
 .PP
 The guarded storage facility is available beginning with System z14.
 .SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
-.PP
 The description of the guarded storage facility along with related
 instructions and Guarded Storage Control Block and
 Guarded Storage Event Parameter List structure layouts
-- 
2.31.1


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

* [PATCH 4/8] s390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 2/8] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 3/8] s390_guarded_storage.2: " Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 5/8] s390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

This function doesn't use any flags or special types, so there's
no reason to include <asm/unistd.h>; remove it.  Add the includes
needed for syscall(2) only.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/s390_pci_mmio_write.2 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/man2/s390_pci_mmio_write.2 b/man2/s390_pci_mmio_write.2
index 57eb54601..4e34889db 100644
--- a/man2/s390_pci_mmio_write.2
+++ b/man2/s390_pci_mmio_write.2
@@ -28,16 +28,19 @@ s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI
 MMIO memory page
 .SH SYNOPSIS
 .nf
-.B #include <asm/unistd.h>
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int s390_pci_mmio_write(unsigned long " mmio_addr ,
+.BI "int syscall(SYS_s390_pci_mmio_write, unsigned long " mmio_addr ,
 .BI "                       const void *" user_buffer ", size_t " length );
-.BI "int s390_pci_mmio_read(unsigned long " mmio_addr ,
+.BI "int syscall(SYS_s390_pci_mmio_read, unsigned long " mmio_addr ,
 .BI "                       void *" user_buffer ", size_t " length );
 .fi
 .PP
 .IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these system calls,
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 The
 .BR s390_pci_mmio_write ()
@@ -102,8 +105,5 @@ 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 wrappers for these system calls; call them using
-.BR syscall (2)
 .SH SEE ALSO
 .BR syscall (2)
-- 
2.31.1


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

* [PATCH 5/8] s390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
                   ` (2 preceding siblings ...)
  2021-05-15 18:20 ` [PATCH 4/8] s390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 6/8] s390_sthyi.2: Replace numeric constant by its name (macro) Alejandro Colomar
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/s390_runtime_instr.2 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/man2/s390_runtime_instr.2 b/man2/s390_runtime_instr.2
index 2ec6e7d25..0685fde6c 100644
--- a/man2/s390_runtime_instr.2
+++ b/man2/s390_runtime_instr.2
@@ -27,13 +27,18 @@
 s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
 .SH SYNOPSIS
 .nf
-.B #include <asm/runtime_instr.h>
+.BR "#include <asm/runtime_instr.h>" " /* Definition of " S390_* " constants */"
+.BR "#include <sys/syscall.h>" "       /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int s390_runtime_instr(int " command ", int " signum ");"
+.BI "int syscall(SYS_s390_runtime_instr, int " command ", int " signum );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR s390_runtime_instr (2),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 The
 .BR s390_runtime_instr ()
@@ -97,9 +102,6 @@ This Linux-specific system call is available only on the s390 architecture.
 The run-time instrumentation facility is available
 beginning with System z EC12.
 .SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2)
-.PP
 The
 .I asm/runtime_instr.h
 header file is available
-- 
2.31.1


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

* [PATCH 6/8] s390_sthyi.2: Replace numeric constant by its name (macro)
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
                   ` (3 preceding siblings ...)
  2021-05-15 18:20 ` [PATCH 5/8] s390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 7/8] s390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages
  Cc: Alejandro Colomar, linux-man, Heiko Carstens,
	Eugene Syromyatnikov, QingFeng Hao

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Cc: QingFeng Hao <haoqf@linux.vnet.ibm.com>
---
 man2/s390_sthyi.2 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/man2/s390_sthyi.2 b/man2/s390_sthyi.2
index d1abb17a4..acba43a20 100644
--- a/man2/s390_sthyi.2
+++ b/man2/s390_sthyi.2
@@ -27,6 +27,7 @@
 s390_sthyi \- emulate STHYI instruction
 .SH SYNOPSIS
 .nf
+.BR "#include <asm/sthyi.h>" "        /* Definition of " STHYI_* " constants */"
 .B #include <asm/unistd.h>
 .PP
 .BI "int s390_sthyi(unsigned long " function_code ", void *" resp_buffer ","
@@ -49,7 +50,7 @@ The
 argument indicates which function to perform.
 The following code(s) are supported:
 .TP
-0
+.B STHYI_FC_CP_IFL_CAP
 Return CP (Central Processor) and IFL (Integrated Facility for Linux)
 capacity information.
 .PP
@@ -58,7 +59,9 @@ The
 argument specifies the address of a response buffer.
 When the
 .I function_code
-is 0, the buffer must be one page (4K) in size.
+is
+.BR STHYI_FC_CP_IFL_CAP ,
+the buffer must be one page (4K) in size.
 If the system call returns 0,
 the response buffer will be filled with CPU capacity information.
 Otherwise, the response buffer's content is unchanged.
-- 
2.31.1


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

* [PATCH 7/8] s390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
                   ` (4 preceding siblings ...)
  2021-05-15 18:20 ` [PATCH 6/8] s390_sthyi.2: Replace numeric constant by its name (macro) Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-15 18:20 ` [PATCH 8/8] sched_setattr.2: " Alejandro Colomar
  2021-05-17  4:55 ` [PATCH 1/8] rename.2: ffix Michael Kerrisk (man-pages)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/s390_sthyi.2 | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/man2/s390_sthyi.2 b/man2/s390_sthyi.2
index acba43a20..df4a91d5d 100644
--- a/man2/s390_sthyi.2
+++ b/man2/s390_sthyi.2
@@ -28,14 +28,19 @@ s390_sthyi \- emulate STHYI instruction
 .SH SYNOPSIS
 .nf
 .BR "#include <asm/sthyi.h>" "        /* Definition of " STHYI_* " constants */"
-.B #include <asm/unistd.h>
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int s390_sthyi(unsigned long " function_code ", void *" resp_buffer ","
-.BI "               uint64_t *" return_code ", unsigned long " flags ");"
+.BI "int syscall(SYS_s390_sthyi, unsigned long " function_code ,
+.BI "            void *" resp_buffer ", uint64_t *" return_code ,
+.BI "            unsigned long " flags );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR s390_sthyi (2),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 The
 .BR s390_sthyi ()
@@ -129,9 +134,6 @@ This system call is available since Linux 4.15.
 .SH CONFORMING TO
 This Linux-specific system call is available only on the s390 architecture.
 .SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2)
-.PP
 For details of the STHYI instruction, see
 .UR https://www.ibm.com\:/support\:/knowledgecenter\:/SSB27U_6.3.0\:/com.ibm.zvm.v630.hcpb4\:/hcpb4sth.htm
 the documentation page
-- 
2.31.1


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

* [PATCH 8/8] sched_setattr.2: Use syscall(SYS_...); for system calls without a wrapper
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
                   ` (5 preceding siblings ...)
  2021-05-15 18:20 ` [PATCH 7/8] s390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
@ 2021-05-15 18:20 ` Alejandro Colomar
  2021-05-17  4:55 ` [PATCH 1/8] rename.2: ffix Michael Kerrisk (man-pages)
  7 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2021-05-15 18:20 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Alejandro Colomar, linux-man

Document also why each header is required

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/sched_setattr.2 | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/man2/sched_setattr.2 b/man2/sched_setattr.2
index 545558a4e..1c24c65d3 100644
--- a/man2/sched_setattr.2
+++ b/man2/sched_setattr.2
@@ -29,17 +29,21 @@ sched_setattr, sched_getattr \-
 set and get scheduling policy and attributes
 .SH SYNOPSIS
 .nf
-.B #include <sched.h>
+.BR "#include <sched.h>" "            /* Definition of " SCHED_* " constants */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.BI "int sched_setattr(pid_t " pid ", struct sched_attr *" attr ,
-.BI "                  unsigned int " flags );
-.BI "int sched_getattr(pid_t " pid ", struct sched_attr *" attr ,
-.BI "                  unsigned int " size ", unsigned int " flags );
+.BI "int syscall(SYS_sched_setattr, pid_t " pid ", struct sched_attr *" attr ,
+.BI "            unsigned int " flags );
+.BI "int syscall(SYS_sched_getattr, pid_t " pid ", struct sched_attr *" attr ,
+.BI "            unsigned int " size ", unsigned int " flags );
 .fi
 .\" FIXME . Add feature test macro requirements
 .PP
 .IR Note :
-There are no glibc wrappers for these system calls; see NOTES.
+glibc provides no wrappers for these system calls,
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 .SS sched_setattr()
 The
-- 
2.31.1


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

* Re: [PATCH 1/8] rename.2: ffix
  2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
                   ` (6 preceding siblings ...)
  2021-05-15 18:20 ` [PATCH 8/8] sched_setattr.2: " Alejandro Colomar
@ 2021-05-17  4:55 ` Michael Kerrisk (man-pages)
  7 siblings, 0 replies; 9+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-05-17  4:55 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: mtk.manpages, linux-man

On 5/16/21 6:20 AM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

Hello Alex,

I have applied all 8 patches.

Thanks,

Michael

> ---
>  man2/rename.2 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man2/rename.2 b/man2/rename.2
> index c83ef08a1..04a183d84 100644
> --- a/man2/rename.2
> +++ b/man2/rename.2
> @@ -39,7 +39,7 @@ rename, renameat, renameat2 \- change the name or location of a file
>  .PP
>  .BI "int rename(const char *" oldpath ", const char *" newpath );
>  .PP
> -.BR "#include <fcntl.h>           " "/* Definition of AT_* constants */"
> +.BR "#include <fcntl.h>           " "/* Definition of " AT_* " constants */"
>  .B #include <stdio.h>
>  .PP
>  .BI "int renameat(int " olddirfd ", const char *" oldpath ,
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

end of thread, other threads:[~2021-05-17  4:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 18:20 [PATCH 1/8] rename.2: ffix Alejandro Colomar
2021-05-15 18:20 ` [PATCH 2/8] rt_sigqueueinfo.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-15 18:20 ` [PATCH 3/8] s390_guarded_storage.2: " Alejandro Colomar
2021-05-15 18:20 ` [PATCH 4/8] s390_pci_mmio_write.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too Alejandro Colomar
2021-05-15 18:20 ` [PATCH 5/8] s390_runtime_instr.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-15 18:20 ` [PATCH 6/8] s390_sthyi.2: Replace numeric constant by its name (macro) Alejandro Colomar
2021-05-15 18:20 ` [PATCH 7/8] s390_sthyi.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-05-15 18:20 ` [PATCH 8/8] sched_setattr.2: " Alejandro Colomar
2021-05-17  4:55 ` [PATCH 1/8] rename.2: ffix Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.