linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: palmer@sifive.com (Palmer Dabbelt)
To: linux-riscv@lists.infradead.org
Subject: [PATCH 1/2] RISC-V: Request stat64 on RV32
Date: Mon, 12 Nov 2018 09:01:43 -0800 (PST)	[thread overview]
Message-ID: <mhng-63079855-2270-4a5b-bde6-82a13f29230a@palmer-si-x1c4> (raw)
In-Reply-To: <CAEn-LTpXnzSG-rVVvv_2cbxqY2vTchOKn6M0isRBovoq4jpZGw@mail.gmail.com>

On Sun, 11 Nov 2018 22:19:02 PST (-0800), david.abdurachmanov at gmail.com wrote:
> On Mon, Nov 12, 2018 at 5:10 AM Zong Li <zongbox@gmail.com> wrote:
>>
>> The stat64 family that is used on 32-bit architectures to replace
>> newstat.
>>
>> Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
>> newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'
>>
>> Signed-off-by: Zong Li <zong@andestech.com>
>> ---
>>  arch/riscv/include/asm/unistd.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
>> index eff7aa9..a4aade9 100644
>> --- a/arch/riscv/include/asm/unistd.h
>> +++ b/arch/riscv/include/asm/unistd.h
>> @@ -18,5 +18,6 @@
>>
>>  #define __ARCH_WANT_NEW_STAT
>>  #define __ARCH_WANT_SYS_CLONE
>> +#define __ARCH_WANT_STAT64
>>  #include <uapi/asm/unistd.h>
>>  #include <uapi/asm/syscalls.h>
>> --
>
> See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html
>
> The plan is not to have old stat syscalls and support statx on
> riscv32, which is y2038 safe.
>
> The issue you see is a bug in include/uapi/asm-generic/unistd.h.
> Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
> __ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
> __NR3264_fstatat and __NR3264_fstat. Which is later used (without any
> guards):
>
> 763 #define __NR_newfstatat __NR3264_fstatat
> 764 #define __NR_fstat __NR3264_fstat

I agree.  Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: Palmer Dabbelt <palmer@sifive.com>
To: david.abdurachmanov@gmail.com
Cc: marcin.juszkiewicz@linaro.org, aou@eecs.berkeley.edu,
	Arnd Bergmann <arnd@arndb.de>,
	zongbox@gmail.com, linux-kernel@vger.kernel.org,
	zong@andestech.com, linux-riscv@lists.infradead.org
Subject: Re: [PATCH 1/2] RISC-V: Request stat64 on RV32
Date: Mon, 12 Nov 2018 09:01:43 -0800 (PST)	[thread overview]
Message-ID: <mhng-63079855-2270-4a5b-bde6-82a13f29230a@palmer-si-x1c4> (raw)
Message-ID: <20181112170143.-NCl71ICWI1ElIsOEiq1BnQQUl2uZy_LAo2mWxDo2ZU@z> (raw)
In-Reply-To: <CAEn-LTpXnzSG-rVVvv_2cbxqY2vTchOKn6M0isRBovoq4jpZGw@mail.gmail.com>

On Sun, 11 Nov 2018 22:19:02 PST (-0800), david.abdurachmanov@gmail.com wrote:
> On Mon, Nov 12, 2018 at 5:10 AM Zong Li <zongbox@gmail.com> wrote:
>>
>> The stat64 family that is used on 32-bit architectures to replace
>> newstat.
>>
>> Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
>> newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'
>>
>> Signed-off-by: Zong Li <zong@andestech.com>
>> ---
>>  arch/riscv/include/asm/unistd.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
>> index eff7aa9..a4aade9 100644
>> --- a/arch/riscv/include/asm/unistd.h
>> +++ b/arch/riscv/include/asm/unistd.h
>> @@ -18,5 +18,6 @@
>>
>>  #define __ARCH_WANT_NEW_STAT
>>  #define __ARCH_WANT_SYS_CLONE
>> +#define __ARCH_WANT_STAT64
>>  #include <uapi/asm/unistd.h>
>>  #include <uapi/asm/syscalls.h>
>> --
>
> See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html
>
> The plan is not to have old stat syscalls and support statx on
> riscv32, which is y2038 safe.
>
> The issue you see is a bug in include/uapi/asm-generic/unistd.h.
> Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
> __ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
> __NR3264_fstatat and __NR3264_fstat. Which is later used (without any
> guards):
>
> 763 #define __NR_newfstatat __NR3264_fstatat
> 764 #define __NR_fstat __NR3264_fstat

I agree.  Thanks!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2018-11-12 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  4:07 [PATCH 0/2] Fix some issue on RV32 Zong Li
2018-11-12  4:07 ` Zong Li
2018-11-12  4:07 ` [PATCH 1/2] RISC-V: Request stat64 " Zong Li
2018-11-12  4:07   ` Zong Li
2018-11-12  6:19   ` David Abdurachmanov
2018-11-12  6:19     ` David Abdurachmanov
2018-11-12  8:29     ` Zong Li
2018-11-12  8:29       ` Zong Li
2018-11-12 17:01     ` Palmer Dabbelt [this message]
2018-11-12 17:01       ` Palmer Dabbelt
2018-11-12  4:07 ` [PATCH 2/2] RISC-V: Support MODULE_SECTIONS mechanism " Zong Li
2018-11-12  4:07   ` Zong Li

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=mhng-63079855-2270-4a5b-bde6-82a13f29230a@palmer-si-x1c4 \
    --to=palmer@sifive.com \
    --cc=linux-riscv@lists.infradead.org \
    /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 NNTP newsgroup(s).