From: XingLi <lixing@loongson.cn>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Xi Ruoyao <xry111@xry111.site>
Cc: libc-alpha@sourceware.org, i.swmail@xen0n.name,
caiyinyu@loongson.cn, wanghongliang@loongson.cn,
hejinyang@loongson.cn
Subject: Re: [PATCH] LoongArch: Add syscall.c for getting correct return value
Date: Fri, 25 Nov 2022 10:37:22 +0800 [thread overview]
Message-ID: <724989a8-57c4-48b8-da1e-5516d894316e@loongson.cn> (raw)
In-Reply-To: <95f208a9-92aa-bf29-036e-5ae7a4556195@linaro.org>
在 2022/11/23 下午9:36, Adhemerval Zanella Netto 写道:
>
>
> On 23/11/22 00:40, Xi Ruoyao wrote:
>> On Wed, 2022-11-23 at 09:57 +0800, Xing Li wrote:
>>> The __SYS_mmap syscall should return 47bits value. If we use
>>> the common syscall interface which defined in
>>> sysdeps/unix/sysv/linux/syscall.c, the syscall return value
>>> is 32bits with sign extend, which lead to mmap failure.
>>
>> Could we just change
>>
>> int r = INTERNAL_SYSCALL_NCS_CALL (number, a0, a1, a2, a3, a4, a5);
>>
>> in sysdeps/unix/sysv/linux/syscall.c to "long r = ..." instead?
>>
>
> Yes, afaik INTERNAL_SYSCALL_NCS on all architecture returns long int.
>
Yes, the __SYSCALL_DEFINEx all returns long in linux kernel.
prev parent reply other threads:[~2022-11-25 2:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 1:57 [PATCH] LoongArch: Add syscall.c for getting correct return value Xing Li
2022-11-23 3:40 ` Xi Ruoyao via Libc-alpha
2022-11-23 13:36 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-25 2:37 ` XingLi [this message]
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=724989a8-57c4-48b8-da1e-5516d894316e@loongson.cn \
--to=lixing@loongson.cn \
--cc=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=hejinyang@loongson.cn \
--cc=i.swmail@xen0n.name \
--cc=libc-alpha@sourceware.org \
--cc=wanghongliang@loongson.cn \
--cc=xry111@xry111.site \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).