Re: How to elf/tst-ldconfig-* in cross test setup

2020-03-11 Thread Vineet Gupta
On 3/11/20 2:36 PM, DJ Delorie via Libc-alpha wrote: > Vineet Gupta via Libc-alpha writes: >> The issue is expected src-path for dso. >> >> | [pid 168] renameat(AT_FDCWD, "/usr/lib/tst-ldconfig-ld-mod.so", AT_FDCWD, >> | "/tmp/tst-l

Re: [PATCH 2/2] ARC: don't align ret_from_exception function

2020-03-11 Thread Vineet Gupta
On 3/11/20 1:58 PM, Eugeniy Paltsev wrote: >> >> I would like to keep it aligned. >> >> ARC700 definitely has penalty for unaligned branch targets, so it will >> definitely >> suffer there. > > Do you know some exact numbers? I'm not an expert in ARC700 (fortunately =) I don't remember the

How to elf/tst-ldconfig-* in cross test setup

2020-03-11 Thread Vineet Gupta
Hi, The following tests fail invariably on ARC cross testing setup FAIL: elf/tst-dlopen-self-container FAIL: elf/tst-dlopen-tlsmodid-container FAIL: elf/tst-ldconfig-bad-aux-cache FAIL: elf/tst-ldconfig-ld_so_conf-update FAIL: elf/tst-pldd This is despite having ldconfig on target. The issue

Re: [PATCH v2 4/4] ARC: allow userspace DSP applications to use AGU extensions

2020-03-11 Thread Vineet Gupta
; Signed-off-by: Eugeniy Paltsev Acked-by: Vineet Gupta ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH v2 3/4] ARC: add support for DSP-enabled userspace applications

2020-03-11 Thread Vineet Gupta
ready save them as r58, r59 pair) > At context switch: > * ACC0_GLO, ACC0_GHI > * DSP_BFLY0, DSP_FFT_CTRL > > Signed-off-by: Eugeniy Paltsev Acked-by: Vineet Gupta ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http

Re: [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches

2020-03-11 Thread Vineet Gupta
Hi Florian, On 2/25/20 1:27 AM, Florian Weimer wrote: > * Vineet Gupta: > >> +/* Override syscalls for asm-generic ABIs with 64-bit time. */ >> +#if __WORDSIZE == 32 && __TIMESIZE == 64 >> + >> +# undef __NR_futex >> +# define __NR_futex __NR_futex_

asm-generic based msgctl (was Re: [PATCH v3 3/3] sysv: linux: Pass 64-bit version of semctl syscall)

2020-03-11 Thread Vineet Gupta
On 3/10/20 5:29 PM, Vineet Gupta via Libc-alpha wrote: > Hi Alistair, > > On 3/4/20 5:26 PM, Alistair Francis wrote: >> The semctl_syscall() function passes a union semun to the kernel. The >> union includes struct semid_ds as a member. On 32-bit architectures the >

Re: [PATCH 2/2] ARC: don't align ret_from_exception function

2020-03-11 Thread Vineet Gupta
On 3/11/20 9:26 AM, Eugeniy Paltsev wrote: > ARC have a tricky implemented ret_from_exception function. > It is written on ASM and can be called like regular function. > However it has another 'entry point' as it can be called as a > continuation of EV_Trap function. It is not really intended /

[PATCH] ARC: show_regs: reduce lines of output

2020-03-11 Thread Vineet Gupta
r16: 0x2012a000 r17: 0x0001 | r18: 0x58fc r19: 0x r20: 0x5948 | r21: 0x0001 r22: 0x r23: 0x5f8c | r24: 0x4008c2a8 r25: 0x2001f6e0 BTA: 0x2004aa18 Signed-off-by: Vineet Gupta --- arch/arc/kernel/troubleshoot.c | 27 --- 1 file changed,

Re: [PATCH 1/2] ARC: define __ALIGN_STR and __ALIGN symbols for ARC

2020-03-11 Thread Vineet Gupta
functions declared with > ENTRY or similar macroses. This leads to generated weird instructions > in code (when alignment is used) like "ldh_s r12,[r0,0x20]" which is > encoded as 0x9090 for ARCv2. > > Let's use ".align 4" which insert a "nop_s" inst

Re: [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros

2020-03-10 Thread Vineet Gupta
On 3/6/20 4:12 PM, Joseph Myers wrote: > If this gets longlong.h back in sync with changes made in the GCC version, > then please commit. This is now committed (my first commit yay !) Thx, -Vineet ___ linux-snps-arc mailing list

Re: [PATCH v3 3/3] sysv: linux: Pass 64-bit version of semctl syscall

2020-03-10 Thread Vineet Gupta
Hi Alistair, On 3/4/20 5:26 PM, Alistair Francis wrote: > The semctl_syscall() function passes a union semun to the kernel. The > union includes struct semid_ds as a member. On 32-bit architectures the > Linux kernel provides a *_high version of the 32-bit sem_otime and > sem_ctime values. These

Re: sourceware account access

2020-03-10 Thread Vineet Gupta
On 3/10/20 10:57 AM, Carlos O'Donell via Libc-alpha wrote: > Please take a look at the following page: > > "Becoming a maintainer (developer)": > https://sourceware.org/glibc/wiki/MAINTAINERS#Becoming_a_maintainer_.28developer.29 > ~~~ > 5. Ask for commit access. > > * Ask one of the project

sourceware account access (was Re: [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros)

2020-03-10 Thread Vineet Gupta
On 3/6/20 4:21 PM, Vineet Gupta wrote: > > BTW, I don't think I asked for commit access before. I just rechecked > MAINTAINERS > wiki page and seems like someone needs to grant me that. Hi Joseph, Carlos I'm trying to setup my sourceware account etc and the form below [1] needs &q

Re: [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros

2020-03-09 Thread Vineet Gupta
On 3/9/20 8:23 AM, Alexander Cherepanov wrote: >> >> PR 89877 >> >> * longlong.h [__arc__] (add_ss): Add cc clobber >> (sub_ddmmss): Likewise. > > Is PR number in subject (88409) wrong? The one in Changelog (89877) seems to > be > right. Yes you are right. I'll fix this up. Thx,

Re: [PATCH v3 12/17] ARC: ABI lists

2020-03-07 Thread Vineet Gupta
On 3/7/20 7:20 AM, Florian Weimer wrote: > * Vineet Gupta: > >> +GLIBC_2.32 sysctl F > > This looks like a mistake, given that ARC doesn't even have the sysctl > system call. > > I think the current way of suppressing that involves creating an empty > sysctl.mk

Re: [PATCH v3 16/17] NEWS: mention ARC port

2020-03-06 Thread Vineet Gupta
On 3/6/20 5:08 PM, Joseph Myers wrote: > "normal" means "the versions documented in install.texi, node Tools for > Compilation, as the minimum for building glibc on most architectures". > > That node should give comprehensive information on what tool versions are > needed to build glibc. If

Re: [PATCH v3 00/17] glibc port to ARC processors

2020-03-06 Thread Vineet Gupta
On 3/6/20 4:21 PM, Joseph Myers wrote: > Please give details of what the entries would be for > and ARC * 32-bit, hard-float, LE: /lib/ld-linux-arc.so.2 * 32-bit, soft-float, LE: /lib/ld-linux-arc.so.2 (soft-float ABI is compatible with

Re: [PATCH v3 16/17] NEWS: mention ARC port

2020-03-06 Thread Vineet Gupta
On 3/6/20 4:14 PM, Joseph Myers wrote: > On Fri, 6 Mar 2020, Vineet Gupta wrote: > >> +* Support for ARC HS cores running Linux has been contributed by Synopsys. >> + Port requires atleast >> +- binutils-2.31 (binutils-2_31-branch: commit 6ce881c15fc4, 2018-10-04)

Re: [PATCH v3 17/17] ARC: changes to enable 64-bit time_t, off_t, ino_t etc

2020-03-06 Thread Vineet Gupta
On 3/6/20 4:19 PM, Joseph Myers wrote: > On Fri, 6 Mar 2020, Vineet Gupta wrote: > >> Signed-off-by: Vineet Gupta >> --- >> .../sysv/linux/arc/bits/socket-constants.h| 4 +-- > > There is a general principle for patch series: you should not have later > p

Re: [PATCH v3 14/17] ARC: Build Infrastructure

2020-03-06 Thread Vineet Gupta
On 3/6/20 4:16 PM, Joseph Myers wrote: > On Fri, 6 Mar 2020, Vineet Gupta wrote: >> + >> +arch_minimum_kernel=3.9.0 > > Surely you mean 5.1.0, at least until the glibc support for falling back > to 32-bit time syscalls from 64-bit time interfaces is completed?

Re: [PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros

2020-03-06 Thread Vineet Gupta
On 3/6/20 4:12 PM, Joseph Myers wrote: > If this gets longlong.h back in sync with changes made in the GCC version, > then please commit. Yes it does. The only differences now are in the initial licensing header due to glibc's variant bumping year and the http -> https. BTW, I don't think I

Re: [PATCH v2 2/4] ARC: handle DSP presence in HW

2020-03-06 Thread Vineet Gupta
ng on the configuration, CPU can contain DSP registers > + (ACC0_GLO, ACC0_GHI, DSP_BFLY0, DSP_CTRL, DSP_FFT_CTRL). > + Bellow is options describing how to handle these registers in typo: Below Looks good otherwise. No need to respin just for this. Reviewed-by: Vineet Gupta ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH v2 1/4] ARC: add helpers to sanitize config options

2020-03-06 Thread Vineet Gupta
On 3/5/20 12:02 PM, Eugeniy Paltsev wrote: > We'll use this macro in coming patches extensively. > > Signed-off-by: Eugeniy Paltsev LGTM ! Acked-by: Vineet Gupta ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead

[PATCH v3 13/17] ARC: Update syscall-names.list for ARC specific syscalls

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/unix/sysv/linux/syscall-names.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list index 3d89814003a2..758b50164103 100644 --- a/sysdeps/unix/sysv/linux/syscall

[PATCH v3 04/17] ARC: startup and dynamic linking code

2020-03-06 Thread Vineet Gupta
Code for C runtime startup and dynamic loading including PLT layout. Signed-off-by: Vineet Gupta --- sysdeps/arc/bits/link.h | 52 ++ sysdeps/arc/dl-machine.h | 340 ++ sysdeps/arc/entry.h | 5 + sysdeps/arc/ldsodefs.h| 43 + sysdeps

[PATCH v3 09/17] ARC: Linux Syscall Interface

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/nptl/tls.h| 14 +- sysdeps/unix/sysv/linux/arc/arch-syscall.h| 317 ++ .../sysv/linux/arc/bits/socket-constants.h| 38 +++ sysdeps/unix/sysv/linux/arc/clone.S | 98 ++ sysdeps/unix/sysv

[PATCH v3 05/17] ARC: Thread Local Storage support

2020-03-06 Thread Vineet Gupta
This includes all 4 TLS addressing models Signed-off-by: Vineet Gupta --- sysdeps/arc/dl-tls.h | 30 +++ sysdeps/arc/libc-tls.c | 27 ++ sysdeps/arc/nptl/tcb-offsets.sym | 11 +++ sysdeps/arc/nptl/tls.h | 150 +++ sysdeps

[PATCH v3 14/17] ARC: Build Infrastructure

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/Implies| 3 +++ sysdeps/arc/Makefile | 25 ++ sysdeps/arc/Versions | 6 ++ sysdeps/arc/configure | 14 sysdeps/arc

[PATCH v3 02/17] ARC: add definitions to elf/elf.h

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- elf/elf.h | 70 ++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/elf/elf.h b/elf/elf.h index ab8930463c67..51e9968405ff 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -330,7 +330,7 @@ typedef struct

[PATCH v3 11/17] ARC: Linux Startup and Dynamic Loading

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/start.S | 15 +++-- sysdeps/unix/sysv/linux/arc/dl-static.c | 84 + sysdeps/unix/sysv/linux/arc/ldsodefs.h | 32 ++ 3 files changed, 125 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix

[PATCH v3 17/17] ARC: changes to enable 64-bit time_t, off_t, ino_t etc

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- .../sysv/linux/arc/bits/socket-constants.h| 4 +-- sysdeps/unix/sysv/linux/arc/bits/timesize.h | 21 +++ sysdeps/unix/sysv/linux/arc/c++-types.data| 16 ++-- sysdeps/unix/sysv/linux/arc/configure | 2 +- sysdeps/unix/sysv

[PATCH v3 07/17] ARC: math soft float support

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/bits/fenv.h | 72 ++ sysdeps/arc/nofpu/Implies | 1 + sysdeps/arc/nofpu/math-tests-exceptions.h | 27 + sysdeps/arc/nofpu/math-tests-rounding.h | 27 + sysdeps/arc/sfp-machine.h

[PATCH v3 06/17] ARC: Atomics and Locking primitives

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/atomic-machine.h | 73 +++ sysdeps/arc/nptl/bits/semaphore.h | 32 ++ 2 files changed, 105 insertions(+) create mode 100644 sysdeps/arc/atomic-machine.h create mode 100644 sysdeps/arc/nptl/bits/semaphore.h

[PATCH v3 12/17] ARC: ABI lists

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/nofpu/libm-test-ulps | 390 +++ sysdeps/arc/nofpu/libm-test-ulps-name |1 + sysdeps/unix/sysv/linux/arc/c++-types.data| 67 + sysdeps/unix/sysv/linux/arc/ld.abilist|5 + .../sysv/linux/arc

[PATCH v3 10/17] ARC: Linux ABI

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/nptl/pthreaddef.h | 32 +++ sysdeps/unix/sysv/linux/arc/bits/procfs.h | 35 +++ .../sysv/linux/arc/bits/types/__sigset_t.h| 12 +++ sysdeps/unix/sysv/linux/arc/getcontext.S | 63 + sysdeps/unix/sysv

[PATCH v3 01/17] gcc PR 88409: miscompilation due to missing cc clobber in longlong.h macros

2020-03-06 Thread Vineet Gupta
04 |printf("%d\n", (size_t)secs); | } The printf eventually called into glibc stdlib/divrem.c:__mpn_divrem() which uses the __arc__ specific inline asm macros from longlong.h which were causing miscompilation. include/ 2019-03-28 Vineet Gupta PR 89877 * longlong.h

[PATCH v3 00/17] glibc port to ARC processors

2020-03-06 Thread Vineet Gupta
# passes outside corporate network | FAIL: stdio-common/bug22 # Needs more RAM: 2 GB memory | FAIL: sunrpc/bug20790 # missing cpp on target | FAIL: timezone/tst-tzset # passes outside corporate network kindly review. Thx, -Vineet Vineet Gupta (17

[PATCH v3 08/17] ARC: hardware floating point support

2020-03-06 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/bits/fenv.h |9 +- sysdeps/arc/fpu/e_sqrt.c| 27 + sysdeps/arc/fpu/e_sqrtf.c | 27 + sysdeps/arc/fpu/fclrexcpt.c | 36 + sysdeps/arc/fpu/fegetenv.c | 37 + sysdeps/arc/fpu/fegetmode.c

[PATCH v3 03/17] ARC: ABI Implementation

2020-03-06 Thread Vineet Gupta
This code deals with the ARC ABI. Signed-off-by: Vineet Gupta --- sysdeps/arc/__longjmp.S | 50 ++ sysdeps/arc/abort-instr.h | 2 + sysdeps/arc/bits/endianness.h | 15 +++ sysdeps/arc/bits/setjmp.h | 26 sysdeps/arc/bsd-_setjmp.S | 1

Re: [PATCH 4/5] ARC: add support for DSP-enabled userspace applications

2020-03-04 Thread Vineet Gupta
On 3/4/20 3:51 AM, Eugeniy Paltsev wrote: >>> +"r" (_saveto), \ >>> +"r" (_readfrom), \ >>> +"I" (_aux), \ >>> +"I"

Re: ELF_INITFINI for ARC (was Re: [PATCH] Introduce and ELF_INITFINI for all architectures)

2020-02-26 Thread Vineet Gupta
On 2/26/20 11:27 AM, Florian Weimer wrote: > I haven't followed the ARC contribution process closely, sorry. Do you > plan to contribute the port with a GLIBC_2.32 ABI baseline, or do you > want to support older binaries for an earlier non-upstream port, > backdating the baseline? No we don't

ELF_INITFINI for ARC (was Re: [PATCH] Introduce and ELF_INITFINI for all architectures)

2020-02-26 Thread Vineet Gupta
Hi Florian, On 2/20/20 10:48 AM, Florian Weimer wrote: > * Andreas Schwab: > >> environ is empty. > > That's because libc.so.6 still has DT_INIT, from which _environ and > other variables are set up. I assumed binutils would convert that into > DT_INITARRAY because the architecture is not

Re: [PATCH v3] asm-generic ABI: Allow statx syscall despite fstatat64, fstat64

2020-02-25 Thread Vineet Gupta
On 2/25/20 8:10 AM, Joseph Myers wrote: > On Mon, 24 Feb 2020, Vineet Gupta wrote: > >> Oh wait. Can we avoid this churn by simply undef __NR_fstat64 and >> __NR_fstatat64 >> from ARC sysdep.h ? And it will then automatically fallback to statx code ! > > If all

Re: [PATCH v3] asm-generic ABI: Allow statx syscall despite fstatat64, fstat64

2020-02-24 Thread Vineet Gupta
On 2/24/20 4:29 PM, Vineet Gupta wrote: > An old version of asm-generic syscall ABI (e.g. ARC 2013) provided > fstat[at]64 syscalls for implementing the stat family. > > These sycalls are passthru (no interworking/itemized-copy needed > between kernel and user structs since

Re: [PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches

2020-02-24 Thread Vineet Gupta
On 2/24/20 4:59 PM, Alistair Francis wrote: >> +/* Override syscalls for asm-generic ABIs with 64-bit time. */ >> +#if __WORDSIZE == 32 && __TIMESIZE == 64 >> + >> +# undef __NR_futex >> +# define __NR_futex __NR_futex_time64 > I think you should do what RV32 does and wrap these in ifndef's ARC

[PATCH v3] asm-generic ABI: Allow statx syscall despite fstatat64, fstat64

2020-02-24 Thread Vineet Gupta
statx conditionals for wordsize-32 *xstat.c") This will be used by ARC port for 64-bit time_t. But it has no real bearing on 64-bit and can just be independently opted-in by an arch port provided the ABI supports it. Signed-off-by: Vineet Gupta --- Changes since v2 * Fixup coding style for #if a

[PATCH v2] asm-generic ABI: Allow statx syscall despite fstatat64, fstat64

2020-02-24 Thread Vineet Gupta
statx conditionals for wordsize-32 *xstat.c") This will be used by ARC port for 64-bit time_t. But it has no real bearing on 64-bit and can just be independently opted-in by an arch port provided the ABI supports it. Signed-off-by: Vineet Gupta --- Changes since v1 * make the toggle #if style r

Re: [PATCH] asm-generic ABI: Allow statx syscall despite fstatat64,fstat64

2020-02-24 Thread Vineet Gupta
On 2/24/20 11:13 AM, Florian Weimer wrote: > * Vineet Gupta: > >> On 2/24/20 10:39 AM, Florian Weimer wrote: >>>> +# undef STAT64_IS_NOT_KERNEL_STAT64 >>> Sorry, I think that going forward, we prefer that such macros are always >>> defined, with values 0

Re: [PATCH] asm-generic ABI: Allow statx syscall despite fstatat64,fstat64

2020-02-24 Thread Vineet Gupta
On 2/24/20 10:39 AM, Florian Weimer wrote: >> +# undef STAT64_IS_NOT_KERNEL_STAT64 > > Sorry, I think that going forward, we prefer that such macros are always > defined, with values 0 or 1 as appropriate. And that means we also need to additionally define this to 0 in all ports which don't end

[PATCH] Force 64-bit time based syscalls for TIMESIZE==64 on 32-bit arches

2020-02-24 Thread Vineet Gupta
This provides better out-of-box support for 32-bit arches with 64-bit time_t Signed-off-by: Vineet Gupta --- sysdeps/unix/sysv/linux/generic/sysdep.h | 48 1 file changed, 48 insertions(+) diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux

[PATCH] asm-generic ABI: Allow statx syscall despite fstatat64, fstat64

2020-02-24 Thread Vineet Gupta
statx conditionals for wordsize-32 *xstat.c") This will be used by ARC port for 64-bit time_t. But it has no real bearing on 64-bit and can just be independently opted-in by an arch port provided the ABI supports it. Signed-off-by: Vineet Gupta --- sysdeps/unix/sysv/linux/

Re: [PATCH 08/15] nios2: Use Linux kABI for syscall return

2020-02-20 Thread Vineet Gupta
On 2/20/20 12:39 PM, Vineet Gupta wrote: > Am I not following this correctly ? Oh never mind, they use 2 seperate regs to convey syscall result and error, so your code is right. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org h

Re: [PATCH 08/15] nios2: Use Linux kABI for syscall return

2020-02-20 Thread Vineet Gupta
Hi Adhemerval, On 2/20/20 5:14 AM, Adhemerval Zanella wrote: > > > On 19/02/2020 18:40, Vineet Gupta wrote: >> On 2/10/20 11:20 AM, Adhemerval Zanella wrote: >>> It changes the nios INTERNAL_SYSCALL_RAW macro to return a negative >>> value instead of 'r2' regis

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-19 Thread Vineet Gupta
Hi Lukasz, On 2/19/20 3:18 PM, Lukasz Majewski wrote: > Please keep in mind that there are some architectures (like 32 bit > ARM), which are NOT using asm-generic API. Right understand that. > Those archs also require support for 64 bit time. That is why Alistair > put the [sg]etitimer

Re: [PATCH 08/15] nios2: Use Linux kABI for syscall return

2020-02-19 Thread Vineet Gupta
On 2/10/20 11:20 AM, Adhemerval Zanella wrote: > It changes the nios INTERNAL_SYSCALL_RAW macro to return a negative > value instead of 'r2' register value on 'err' macro argument. > > The macro INTERNAL_SYSCALL_DECL is no longer required, and the > INTERNAL_SYSCALL_ERROR_P follows the other

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-19 Thread Vineet Gupta
On 2/19/20 12:30 AM, Andreas Schwab wrote: > On Feb 19 2020, Vineet Gupta wrote: > >> On 2/18/20 5:03 PM, Alistair Francis wrote: >>>>> +#define STAT_IS_KERNEL_STAT 1 >>>> Isn't this irrelevant: seems to be only used for legacy >>>> __NR_stat

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-18 Thread Vineet Gupta
On 2/18/20 5:03 PM, Alistair Francis wrote: >>> +#define STAT_IS_KERNEL_STAT 1 >> Isn't this irrelevant: seems to be only used for legacy __NR_stat/__NR_stat64 >> syscalls based__xstat()/__xstat64(). > Is it? It seems to be used in a few places, including: > > sysdeps/unix/sysv/linux/fxstatat.c >

[PATCH] Remove STATFS_IS_STATFS64 conditional as it is zero in all ports

2020-02-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 1 - sysdeps/unix/sysv/linux/fstatfs64.c | 14 -- sysdeps/unix/sysv/linux/generic/kernel_stat.h | 2 -- .../unix/sysv/linux/generic/wordsize-32/fstatfs.c | 2 -- .../unix/sysv

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-18 Thread Vineet Gupta
Hi Alistair, On 1/12/20 2:33 AM, Alistair Francis wrote: > diff --git a/sysdeps/unix/sysv/linux/riscv/kernel_stat.h > b/sysdeps/unix/sysv/linux/riscv/kernel_stat.h [snip]... > +#define STAT_IS_KERNEL_STAT 1 Isn't this irrelevant: seems to be only used for legacy __NR_stat/__NR_stat64 syscalls

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)

2020-02-18 Thread Vineet Gupta
Hi Alistair, Arnd On 2/14/20 2:39 PM, Alistair Francis wrote: > On Tue, Feb 11, 2020 at 5:30 PM Joseph Myers wrote: >> On Tue, 11 Feb 2020, Alistair Francis wrote: >> > diff --git a/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h > b/sysdeps/unix/sysv/linux/riscv/bits/typesizes.h >

Re: [PATCH] ARC: Replace by

2020-02-12 Thread Vineet Gupta
On 2/12/20 2:00 AM, Geert Uytterhoeven wrote: > The ARC platform code is not a clock provider, and just needs to call > of_clk_init(). > > Hence it can include instead of . > > Signed-off-by: Geert Uytterhoeven Thx for this Geert. Do you want me to pick this up. Thx, -Vineet

Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64

2020-02-11 Thread Vineet Gupta
Hi Alistair, On 1/12/20 2:33 AM, Alistair Francis wrote: > Using the original glibc headers under bits/ let's make small > modifications to use 64-bit time_t and off_t for both RV32 and RV64. > > For the typesizes.h, here are justifications for the changes from the > generic version (based on

Re: ARCv2 Public PRM (was Re: [PATCH v2 00/15] glibc port to ARC processors)

2020-02-06 Thread Vineet Gupta
On 2/6/20 2:06 PM, Alistair Francis wrote: >> >> I'd suggest posting patches that are on top of the RV32 ones (maybe >> there's a git tree with RV32 changes to current glibc that could be used), >> and that only support Linux 5.1 and later (so you don't need anything much >> of the Y2038 support

Re: [PATCH] arch/arc: fix some Kconfig typos

2020-02-03 Thread Vineet Gupta
On 1/31/20 5:49 PM, Randy Dunlap wrote: > From: Randy Dunlap > > Fix language typos in arch/arc/Kconfig. > > Signed-off-by: Randy Dunlap > Thx Randy. Added to for-curr. -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Vineet Gupta
On 1/27/20 7:33 PM, Qian Cai wrote: > >>> What’s the value of this block of new code? It only supports x86 and arm64 >>> which are supposed to be good now. >> We have been over the usefulness of this code many times before as the patch >> is >> already in it's V12. Currently it is enabled on

Re: [PATCH] ARC: fpu: preserve userspace fpu state

2020-01-17 Thread Vineet Gupta
On 1/17/20 4:49 PM, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta > --- > arch/arc/Kconfig | 15 +++-- > arch/arc/include/asm/arcregs.h | 2 ++ > arch/arc/include/asm/fpu.h | 54 > arch/arc/include/as

[PATCH 0/2] ARCv2 FPU registers save/restore

2020-01-17 Thread Vineet Gupta
Vineet Gupta (2): ARC: fpu: declutter code, move bits out into fpu.h ARCv2: fpu: preserve userspace fpu state arch/arc/Kconfig | 15 +++-- arch/arc/include/asm/arcregs.h | 2 ++ arch/arc/include/asm/fpu.h | 55 arch/arc/include

[PATCH] ARC: fpu: preserve userspace fpu state

2020-01-17 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 15 +++-- arch/arc/include/asm/arcregs.h | 2 ++ arch/arc/include/asm/fpu.h | 54 arch/arc/include/asm/processor.h | 10 +- arch/arc/include/asm/switch_to.h | 17 ++ arch

ARCv2 Public PRM (was Re: [PATCH v2 00/15] glibc port to ARC processors)

2020-01-17 Thread Vineet Gupta
Hi Joseph, On 1/30/19 10:15 AM, Vineet Gupta wrote: > On 1/29/19 6:29 PM, Joseph Myers wrote: >> In the absence of clear consensus regarding consideration of new ports to >> undocumented architectures (which would need to result in consensus on >> suitable rules

[PATCH v2 2/2] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-15 Thread Vineet Gupta
The existing ARC variants have 2 issues - Use ZOL which may not be present in forthcoming architecture - Byte loop based vs. generic version which is word loop based Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 2 + arch/arc/include/asm/uaccess.h | 85

[PATCH v2 0/2] Switching ARC to optimized generic strncpy_from_user

2020-01-15 Thread Vineet Gupta
ion patch [Linus] - Folded 2 ARC patches into 1 Thx, -Vineet Vineet Gupta (2): asm-generic/uaccess: don't define inline functions if noinline lib/* in use ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user arch/arc/Kconfig | 2 + arch/arc/include/

[PATCH] ARC: wireup clone3 syscall

2020-01-15 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 1 + arch/arc/include/asm/syscalls.h| 1 + arch/arc/include/uapi/asm/unistd.h | 1 + arch/arc/kernel/entry.S| 12 arch/arc/kernel/process.c | 7 +++ arch/arc/kernel/sys.c

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-15 Thread Vineet Gupta
On 1/14/20 12:57 PM, Arnd Bergmann wrote: > On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta > wrote: >> There are 2 generic varaints of strncpy_from_user() / strnlen_user() >> (1). inline version in asm-generic/uaccess.h >> (2). optimized word-at-a-time version in lib/* &

Re: [RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-15 Thread Vineet Gupta
On 1/15/20 6:42 AM, Andrey Konovalov wrote: >> - max_addr = user_addr_max(); >> - src_addr = (unsigned long)untagged_addr(src); > > If you end up changing this code, you need to keep the untagged_addr() > logic, otherwise this breaks arm64 tagged address ABI [1]. It is moot point now,

clone3 on ARC (was Re: [PATCH v3 2/2] arch: wire-up clone3() syscall)

2020-01-15 Thread Vineet Gupta
On 6/4/19 2:29 PM, Christian Brauner wrote: > On Tue, Jun 04, 2019 at 08:40:01PM +0200, Arnd Bergmann wrote: >> On Tue, Jun 4, 2019 at 6:09 PM Christian Brauner >> wrote: >>> >>> Wire up the clone3() call on all arches that don't require hand-rolled >>> assembly. >>> >>> Some of the arches look

strace breaks with to be released glibc 2.31

2020-01-15 Thread Vineet Gupta
Hi, I've been testing an in-works glibc port for ARC and with 2.31 there's a glibc change which seems to break strace. Commit d1e411e5c786ce3 "Add PTRACE_GET_SYSCALL_INFO from Linux 5.3 to sys/ptrace.h." This now defines PTRACE_GET_SYSCALL_INFO but defines struct __ptrace_syscall_info (not

Re: [PATCH] PR 92846: [ARC] generate signaling FDCMPF for hard float comparisons

2020-01-14 Thread Vineet Gupta
On 1/14/20 3:49 PM, Vineet Gupta wrote: > On 12/9/19 11:02 AM, Vineet Gupta wrote: >> ARC gcc generates FDCMP instructions which raises Invalid operation for >> signaling NaN only. This causes glibc iseqsig() primitives to fail (in >> the current ongoing glibc port to A

Re: [PATCH] PR 92846: [ARC] generate signaling FDCMPF for hard float comparisons

2020-01-14 Thread Vineet Gupta
On 12/9/19 11:02 AM, Vineet Gupta wrote: > ARC gcc generates FDCMP instructions which raises Invalid operation for > signaling NaN only. This causes glibc iseqsig() primitives to fail (in > the current ongoing glibc port to ARC) > > So split up the hard float compares into

Re: [RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-14 Thread Vineet Gupta
On 1/14/20 1:22 PM, Linus Torvalds wrote: > On Tue, Jan 14, 2020 at 12:09 PM Vineet Gupta > wrote: >> >> This came up when switching ARC to word-at-a-time interface and using >> generic/optimized strncpy_from_user >> >> It seems the existing code checks f

Re: [RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Vineet Gupta
On 1/14/20 12:42 PM, Arnd Bergmann wrote: > On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta > wrote: > >> diff --git a/arch/arc/include/asm/word-at-a-time.h >> b/arch/arc/include/asm/word-at-a-time.h >> new file mode 100644 >> index ..00e92be70987 &

[RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Vineet Gupta
when switching ARC to generic word-at-a-time interface Signed-off-by: Vineet Gupta --- include/asm-generic/uaccess.h | 4 1 file changed, 4 insertions(+) diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index e935318804f8..74c14211377b 100644 --- a/include/asm-generic

[RFC 0/4] Switching ARC to optimized generic strncpy_from_user

2020-01-14 Thread Vineet Gupta
the case but I felt like sharing it anyways to see what others think. - 3/4, 4/4 are ARC changes to remove the existing ARC version and switch to generic (needs 1/4). Thx, -Vineet Vineet Gupta (4): asm-generic/uaccess: don't define inline functions if noinline lib/* in use lib

[RFC 4/4] ARC: uaccess: use optimized generic __strnlen_user/__strncpy_from_user

2020-01-14 Thread Vineet Gupta
These rely on word access rather than byte loop Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 2 + arch/arc/include/asm/Kbuild | 1 - arch/arc/include/asm/uaccess.h| 71 ++- arch/arc/include/asm/word-at-a-time.h | 49

[RFC 2/4] lib/strncpy_from_user: Remove redundant user space pointer range check

2020-01-14 Thread Vineet Gupta
check as is true for any copy_{to,from}_user() And in case actual user space buffer is smaller than kernel dest pointer (i.e. @max < @count) the usual string copy, null byte detection would abort the process early anyways Signed-off-by: Vineet Gupta --- lib/strncpy_from_us

[RFC 3/4] ARC: uaccess: remove noinline variants of __strncpy_from_user() and friends

2020-01-14 Thread Vineet Gupta
This helps with subsequent removal of arch specific variants in favour of optimized generic routines (word vs byte access) Signed-off-by: Vineet Gupta --- arch/arc/include/asm/uaccess.h | 26 ++ arch/arc/mm/extable.c | 23 --- 2 files changed

Re: [PATCH net 4/4] ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node

2020-01-14 Thread Vineet Gupta
On 1/14/20 8:09 AM, Jose Abreu wrote: > Add a missing property to GMAC node so that multicast filtering works > correctly. > > Fixes: 556cc1c5f528 ("ARC: [axs101] Add support for AXS101 SDP (software > development platform)") > Signed-off-by: Jose Abreu Added to for-curr. Thx, -Vineet

Re: [Buildroot] [PATCH v2] binutils/ARC: cleanup

2020-01-13 Thread Vineet Gupta
Hi Thomas, On 12/22/19 1:41 PM, Thomas Petazzoni wrote: > Hello Vineet, > > On Tue, 17 Dec 2019 13:32:53 -0800 > Vineet Gupta wrote: > >> Remove special handling for ARC - as it is not needed for cksy etc. >> >> A nice side benefit is that the AR

Re: [PATCH 3/5] ARC: handle DSP presence in HW

2020-01-13 Thread Vineet Gupta
On 1/10/20 6:54 AM, Eugeniy Paltsev wrote: > >>> + CHK_OPT_STRICT(CONFIG_ARC_DSP_KERNEL, present); >>> } > My idea here is to encapsulate implementation of everything dsp-related in the > file with dsp code. So I'm even thinking about moving the config check itself > to some

Re: [PATCH 4/5] ARC: add support for DSP-enabled userspace applications

2020-01-09 Thread Vineet Gupta
On 1/9/20 11:01 AM, Eugeniy Paltsev wrote: > Hi Vineet, > >> From: Vineet Gupta >> On 12/27/19 10:03 AM, Eugeniy Paltsev wrote: >>> To be able to run DSP-enabled userspace applications we need to >>> save and restore following DSP-related regist

Re: [PATCH 5/5] ARC: allow userspace DSP applications to use AGU extensions

2020-01-07 Thread Vineet Gupta
On 12/27/19 10:03 AM, Eugeniy Paltsev wrote: > To be able to run DSP-enabled userspace applications with AGU > (address generation unit) extensions we additionally need to > save and restore following registers at context switch: > * AGU_AP* > * AGU_OS* > * AGU_MOD* > > Signed-off-by: Eugeniy

Re: [PATCH 4/5] ARC: add support for DSP-enabled userspace applications

2020-01-07 Thread Vineet Gupta
On 12/27/19 10:03 AM, Eugeniy Paltsev wrote: > To be able to run DSP-enabled userspace applications we need to > save and restore following DSP-related registers: > At IRQ/exception entry/exit: > * ACC0_GLO, ACC0_GHI, DSP_CTRL > * ACC0_LO, ACC0_HI (we already save them as r58, r59 pair) > At

Re: [PATCH 3/5] ARC: handle DSP presence in HW

2020-01-06 Thread Vineet Gupta
On 1/6/20 5:03 PM, Vineet Gupta wrote: > >> +.macro DSP_SAVE_REGFILE_IRQ >> +#if defined(CONFIG_ARC_DSP_KERNEL) >> +/* Drop any changes to DSP_CTRL made by userspace so userspace won't be >> + * able to break kernel */ >> +mov r58, DSP_CTRL

Re: [PATCH 3/5] ARC: handle DSP presence in HW

2020-01-06 Thread Vineet Gupta
On 12/27/19 10:03 AM, Eugeniy Paltsev wrote: > In case of DSP extension presence in HW some instructions > (related to integer multiply, multiply-accumulate, and divide > operation) executes on this DSP execution unit. So their > execution will depend on dsp configuration register (DSP_CTRL) > >

Re: [PATCH 2/5] ARC: add helpers to sanitize config options

2020-01-06 Thread Vineet Gupta
On 12/27/19 10:03 AM, Eugeniy Paltsev wrote: > We'll use this macro in coming patches extensively. > > Signed-off-by: Eugeniy Paltsev LGTM. -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

[GIT PULL] ARC updates for 5.5-rc6

2020-01-06 Thread Vineet Gupta
Hi Linus, Happy New Year. Please pull ARC fixed for 5.5-rc6. Thx, -Vineet -> The following changes since commit e42617b825f8073569da76dc4510bfa019b1c35a:   Linux 5.5-rc1 (2019-12-08 14:57:55 -0800) are available in the Git repository at:  

Re: [PATCH 1/5] ARC: pt_regs: remove hardcoded registers offset

2019-12-28 Thread Vineet Gupta
On 12/27/19 10:03 AM, Eugeniy Paltsev wrote: > Replace hardcoded registers offset numbers by calculated via > offsetof. > > Signed-off-by: Eugeniy Paltsev LGTM. This seems like an independent cleanup so added to for-curr Thx, -Vineet ___

Re: [RFC/RFT WIP PATCH] arc: add sparsemem support

2019-12-19 Thread Vineet Gupta
On 12/19/19 6:57 AM, Eugeniy Paltsev wrote: > You can find instructions describing how to run Linux with nSIM free here: > https://github.com/foss-for-synopsys-dwc-arc-processors/linux/wiki/How-to-run-ARC-Linux-kernel-and-debug-(with-MetaWare-Debugger)#standalone-nsim-also-free-nsim > > If you are

[PATCH v2] binutils/ARC: cleanup

2019-12-17 Thread Vineet Gupta
Remove special handling for ARC - as it is not needed for cksy etc. A nice side benefit is that the ARC specific version now only needs to be specified in single place (vs 3 currently) in binutils/Config.in.host Signed-off-by: Vineet Gupta --- package/binutils/binutils.mk | 6 +- 1 file

Re: [uclibc-ng-devel] stdio fudging errno ?

2019-12-16 Thread Vineet Gupta
On 12/14/19 1:37 AM, Florian Weimer wrote: > * Vineet Gupta: > >> Here's a simple test case which shows the problem: >> >> #define _GNU_SOURCE >> #include >> #include >> #include >> >> void main(void) >

<    2   3   4   5   6   7   8   9   10   11   >