From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
Alistair Francis <alistair.francis@wdc.com>,
Lukasz Majewski <lukma@denx.de>
Subject: Re: [PATCH v4 08/15] ARC: Linux Syscall Interface
Date: Fri, 27 Mar 2020 04:34:55 +0000 [thread overview]
Message-ID: <f0fd1b9f-d1fb-6492-18d5-2c1bed0941e3@synopsys.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2003262342490.24611@digraph.polyomino.org.uk>
+CC a few folks working on 64-bit time changes
On 3/26/20 4:52 PM, Joseph Myers wrote:
> On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote:
>
>> diff --git a/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h
>> new file mode 100644
>> index 000000000000..74b0c06edb36
>> --- /dev/null
>> +++ b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h
>
> As far as I can see, the only reason for having this header is to use
> appropriate values of SO_RCVTIMEO and SO_SNDTIMEO for 64-bit time.
>
> It's best not to need a separate version of this header for all future
> 32-bit architectures. So I'd suggest putting the conditionals on the size
> of time_t in the default sysdeps/unix/sysv/linux/bits/socket-constants.h
> instead.
OK this was loosely based on RV32 port. I can fix as you say, as a
standalone/separate patch I suppose.
But in grep'ing I see a weird thing: SO_RCVTIMEO in user exposed socket.h has a
totally different value from socket-constants.h - how is that supposed to work.
$git grep SO_RCVTIME
bits/socket.h:348: SO_RCVTIMEO = 0x1006, /* Receive timeout. */
bits/socket.h:349:#define SO_RCVTIMEO SO_RCVTIMEO
sysdeps/unix/sysv/linux/arc/bits/socket-constants.h:33:#define SO_RCVTIMEO 66
sysdeps/unix/sysv/linux/bits/socket-constants.h:33:#define SO_RCVTIMEO 20
sysdeps/unix/sysv/linux/riscv/bits/socket-constants.h:34:# define SO_RCVTIMEO 66
sysdeps/unix/sysv/linux/riscv/bits/socket-constants.h:36:# define SO_RCVTIMEO 20
> Should the choice of values of these macros, for normal user programs, be
> based on the time_t for the current compilation (as affected by _TIME_BITS
> in future) or on the time_t for the default ABI in glibc?
If that's a question for me, I'm afraid Its above my paygrade :-)
> If the latter,
> it would be a __TIMESIZE conditional in the header (that is, a conditional
> based on __TIMESIZE == __SYSCALL_WORDSIZE, or using __WORDSIZE when
> __SYSCALL_WORDSIZE is not defined, since the actual kernel conditional is
> about whether using the same time_t size as kernel "long").
> If the
> former, it might use __TIMESIZE right now, but that would need to change
> when _TIME_BITS is supported to a different macro meaning the time_t size
> for the current compilation.
This approach seems similar to what Alistair has done for generic/bits/typesizes.h
shall we pursue it ?
>
>> diff --git a/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
>> new file mode 100644
>> index 000000000000..6c129398483a
>> --- /dev/null
>> +++ b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
>> @@ -0,0 +1,6 @@
>> +#define JMP_BUF_SIZE (32 + 1 + 64/(8 * sizeof (unsigned long int))) * sizeof (unsigned long int)
>> +#define SIGJMP_BUF_SIZE (32 + 1 + 64/(8 * sizeof (unsigned long int))) * sizeof (unsigned long int)
>
> Missing spaces around '/'.
Fixed.
>> +/* The minimum supported kernel version for ARC is 3.9,
>> + guaranteeing many kernel features. */
>
> But actually it's 5.1 at present.
Right, fixed that.
>> +/* All syscall handler come here to avoid generated code bloat due to
>> + GOT reference to errno_location or it's equivalent. */
>> +int
>> +__syscall_error(int err_no)
>
> Missing space before '('
Oops, fixed now.
>
>> +{
>> + __set_errno(-err_no);
>
> Likewise.
Fixed.
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2020-03-27 4:35 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 3:04 [PATCH v4 00/15] glibc port to ARC processors Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 01/15] ARC: add definitions to elf/elf.h Vineet Gupta
2020-03-26 1:37 ` Joseph Myers
2020-03-26 1:52 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 02/15] ARC: ABI Implementation Vineet Gupta
2020-03-26 1:52 ` Joseph Myers
2020-03-26 2:39 ` Vineet Gupta
2020-03-26 18:48 ` Joseph Myers
2020-03-27 0:37 ` Vineet Gupta
2020-03-27 23:33 ` Vineet Gupta
2020-03-27 23:35 ` Joseph Myers
2020-03-27 23:47 ` Vineet Gupta
2020-03-31 21:08 ` Big Endian support as multi-ABI (was Re: [PATCH v4 02/15] ARC: ABI Implementation) Vineet Gupta
2020-03-31 21:27 ` Joseph Myers
2020-03-31 21:35 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 03/15] ARC: startup and dynamic linking code Vineet Gupta
2020-03-26 1:55 ` Joseph Myers
2020-03-26 2:45 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 04/15] ARC: Thread Local Storage support Vineet Gupta
2020-03-26 1:57 ` Joseph Myers
2020-03-26 2:47 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 05/15] ARC: Atomics and Locking primitives Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 06/15] ARC: math soft float support Vineet Gupta
2020-03-26 1:59 ` Joseph Myers
2020-03-26 2:48 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 07/15] ARC: hardware floating point support Vineet Gupta
2020-03-26 2:06 ` Joseph Myers
2020-03-26 3:19 ` Vineet Gupta
2020-03-26 23:22 ` Joseph Myers
2020-03-27 1:50 ` Vineet Gupta
2020-03-27 18:37 ` Joseph Myers
2020-03-27 18:53 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 08/15] ARC: Linux Syscall Interface Vineet Gupta
2020-03-26 23:52 ` Joseph Myers
2020-03-27 4:34 ` Vineet Gupta [this message]
2020-03-27 18:38 ` Joseph Myers
2020-03-13 3:04 ` [PATCH v4 09/15] ARC: Linux ABI Vineet Gupta
2020-03-27 0:38 ` Joseph Myers
2020-03-27 4:45 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 10/15] ARC: Linux Startup and Dynamic Loading Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 11/15] ARC: ABI lists Vineet Gupta
2020-03-27 0:40 ` Joseph Myers
2020-03-27 4:36 ` Vineet Gupta
2020-03-27 18:39 ` Joseph Myers
2020-03-27 19:09 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 12/15] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 13/15] ARC: Build Infrastructure Vineet Gupta
2020-03-27 22:47 ` Joseph Myers
2020-03-28 6:42 ` Vineet Gupta
2020-03-31 22:02 ` Vineet Gupta
2020-03-31 22:48 ` Joseph Myers
2020-04-01 0:44 ` __syscall_error (was Re: [PATCH v4 13/15] ARC: Build Infrastructure) Vineet Gupta
2020-04-01 7:58 ` Andreas Schwab
2020-04-01 21:38 ` Vineet Gupta
2020-04-01 17:06 ` Joseph Myers
2020-04-02 0:00 ` Vineet Gupta
2020-04-02 8:50 ` Florian Weimer
2020-04-02 20:22 ` Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 14/15] build-many-glibcs.py: Enable ARC builds Vineet Gupta
2020-03-13 3:04 ` [PATCH v4 15/15] Documentation for ARC port Vineet Gupta
2020-03-27 22:49 ` Joseph Myers
2020-03-27 23:56 ` Vineet Gupta
2020-03-28 0:01 ` Joseph Myers
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=f0fd1b9f-d1fb-6492-18d5-2c1bed0941e3@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=alistair.francis@wdc.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=lukma@denx.de \
/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).