Linux SNPS ARC Archive on lore.kernel.org
 help / color / Atom feed
From: Vineet Gupta <vineetg76@gmail.com>
To: Alistair Francis <alistair23@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Palmer Dabbelt <palmerdabbelt@google.com>,
	Zong Li <zongbox@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	"Maciej W. Rozycki" <macro@wdc.com>,
	arcml <linux-snps-arc@lists.infradead.org>,
	Joseph Myers <joseph@codesourcery.com>
Subject: Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64
Date: Tue, 11 Feb 2020 17:42:37 -0800
Message-ID: <3ca7e2cb-55c2-1118-90b8-505586b36ee7@gmail.com> (raw)
In-Reply-To: <CAKmqyKMyf2psPp+-EHoidvbPbSXv0=dP26GjVQnT5BUriLc1gA@mail.gmail.com>

On 2/11/20 4:14 PM, Alistair Francis wrote:
> On Tue, Feb 11, 2020 at 4:14 PM Vineet Gupta <vineetg76@gmail.com> wrote:

>>> diff --git a/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h b/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h
>>> new file mode 100644
>>> index 0000000000..0da3bdeb5d
>>> --- /dev/null
>>> +++ b/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h
>>
>> I was hoping newer arches could simply use the asm-generic one ?
> 
> We need to specify that RV32 uses a 64-bit time_t. The generic ones
> don't do that for 32-bit arches.

Right. It pains to see that each new port (despite using asm-generic syscall ABI)
will have to make their own copy of something so fundamental as typesizes.h where
only a few things will change. The generic file is no longer generic :-(
Oh well !

>>> +/* Tell the libc code that off_t and off64_t are actually the same type
>>> +   for all ABI purposes, even if possibly expressed as different base types
>>> +   for C type-checking purposes.  */
>>> +# define __OFF_T_MATCHES_OFF64_T 1
>>
>> This is orthogonal to time_t but since we are on topic of newer ports, how are you
>> doing this. The asm-generic uapi defines
>>
>>         typedef __kernel_long_t __kernel_off_t;
>>
>> and types.h defines
>>
>>         typedef __kernel_off_t off_t;
>>
>> And I presume long on RV32 is 32-bits
> 
> Can you point me to the code? Last time I looked the kernel used the
> 64-bit versions for the syscalls on RV32.

You are right. I got confused with the types above: asm-generic syscalls on 32-bit
arches use struct stat64 etc which has 64-bit inode. Similarly sys_llseek uses
low/high parts for offset.

>>> +/* Same for ino_t and ino64_t.  */
>>> +# define __INO_T_MATCHES_INO64_T 1

I'm surprised that ARC port doesn't define this in glibc, yet we use the
asm-generic syscall interface where this is true. I need to investigate more.

Thx,
-vineet

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

  parent reply index

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1578824547.git.alistair.francis@wdc.com>
     [not found] ` <4e95f95966d8d7c6a8339160dc62d81c1f6a1bfb.1578824547.git.alistair.francis@wdc.com>
2020-02-12  0:14   ` Vineet Gupta
2020-02-12  0:14     ` Alistair Francis
2020-02-12  1:30       ` Joseph Myers
2020-02-14 22:39         ` Alistair Francis
2020-02-18 23:05           ` switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64) Vineet Gupta
2020-02-18 23:13             ` Joseph Myers
2020-02-19 23:09               ` Lukasz Majewski
2020-02-19 23:11             ` Lukasz Majewski
2020-02-20  8:31               ` Arnd Bergmann
2020-02-20  9:37                 ` Lukasz Majewski
2020-02-20 12:37                   ` Arnd Bergmann
2020-02-20 13:14                     ` Lukasz Majewski
2020-02-20 14:44                       ` Arnd Bergmann
2020-02-20 15:42                         ` Lukasz Majewski
2020-02-20 16:08                           ` Arnd Bergmann
2020-02-20 16:31                             ` Lukasz Majewski
2020-02-20 16:27                 ` Helmut Grohne
2020-02-12  1:42       ` Vineet Gupta [this message]
2020-02-12 12:58         ` [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64 Arnd Bergmann
2020-02-19  0:56   ` Vineet Gupta
2020-02-19  1:03     ` Alistair Francis
2020-02-19  1:31       ` Vineet Gupta
2020-02-19  8:30         ` Andreas Schwab
2020-02-19 18:42           ` Vineet Gupta
2020-02-19 23:18             ` Lukasz Majewski
2020-02-20  0:26               ` Vineet Gupta
2020-02-20  0:46                 ` Joseph Myers
2020-02-20  8:24                   ` Arnd Bergmann
2020-02-20 10:28                     ` Lukasz Majewski
2020-02-20 14:14                     ` Joseph Myers

Reply instructions:

You may reply publically 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=3ca7e2cb-55c2-1118-90b8-505586b36ee7@gmail.com \
    --to=vineetg76@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=arnd@arndb.de \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=macro@wdc.com \
    --cc=palmerdabbelt@google.com \
    --cc=zongbox@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

Linux SNPS ARC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-snps-arc/0 linux-snps-arc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-snps-arc linux-snps-arc/ https://lore.kernel.org/linux-snps-arc \
		linux-snps-arc@lists.infradead.org
	public-inbox-index linux-snps-arc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-snps-arc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git