From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: "Peter Fröhlich" <peter.hans.froehlich@gmail.com>,
"Rich Felker" <dalias@libc.org>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: [patch] syscall.2: Update superh syscall convention
Date: Tue, 22 Dec 2020 13:33:17 +0100 [thread overview]
Message-ID: <e85efdb1-c26a-540b-cc17-bcf088492c35@gmail.com> (raw)
In-Reply-To: <CAHXXO6EzZ-3iRj9tm-4N4-nrWDy44sZX=bq9N0wmL5L=PmWYLg@mail.gmail.com>
Hi Peter,
I found Rich's email on the lkml archives.
Thanks,
Alex
On 12/22/20 1:28 PM, Peter Fröhlich wrote:
> I noticed this while working on some silly "hello, world" programs,
> see https://git.sr.ht/~phf/hello-again if you're curious.
> Disassembling sh4 code showed trap #31 all over the place but the
> syscall(2) man page talked about trap #0x17 and friends. Checking the
> kernel sources I got lucky in arch/sh/kernel/entry-common.S where in
> commit 3623d138213ae Rich Felker clarifies the situation. (I would
> have cc'ed Rich but I cannot find his email.) I've attached the patch
> since I am less than convinced that gmail will properly preserve it
> inline.
>
> ---
> man2/syscall.2 | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/man2/syscall.2 b/man2/syscall.2
> index 986db9d11..87de539dd 100644
> --- a/man2/syscall.2
> +++ b/man2/syscall.2
> @@ -216,7 +216,7 @@ powerpc64 sc r0 r3 - cr0.SO 1
> riscv ecall a7 a0 a1 -
> s390 svc 0 r1 r2 r3 - 3
> s390x svc 0 r1 r2 r3 - 3
> -superh trap #0x17 r3 r0 r1 - 4, 6
> +superh trapa #31 r3 r0 r1 - 4, 6
> sparc/32 t 0x10 g1 o0 o1 psr/csr 1, 6
> sparc/64 t 0x6d g1 o0 o1 psr/csr 1, 6
> tile swint1 R10 R00 - R01 1
> @@ -252,15 +252,9 @@ For s390 and s390x,
> .I "svc\ NR"
> if it is less than 256.
> .IP [4]
> -On SuperH, the trap number controls the maximum number of arguments passed.
> -A
> -.IR "trap\ #0x10"
> -can be used with only 0-argument system calls, a
> -.IR "trap\ #0x11"
> -can be used with 0- or 1-argument system calls,
> -and so on up to
> -.IR "trap #0x17"
> -for 7-argument system calls.
> +On SuperH additional trap numbers are supported for historic reasons, but
> +.BR trapa #31
> +is the recommended "unified" ABI.
> .IP [5]
> The x32 ABI shares syscall table with x86-64 ABI, but there are some
> nuances:
>
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
next prev parent reply other threads:[~2020-12-22 12:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 12:28 [patch] syscall.2: Update superh syscall convention Peter Fröhlich
2020-12-22 12:33 ` Alejandro Colomar (man-pages) [this message]
2020-12-22 17:16 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e85efdb1-c26a-540b-cc17-bcf088492c35@gmail.com \
--to=alx.manpages@gmail.com \
--cc=dalias@libc.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=peter.hans.froehlich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox