Re: [PATCH 08/21] ARC: Linux Syscall Interface

2018-12-18 Thread Vineet Gupta
On 12/18/18 3:30 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> +/* Flush cache(s). */ >> +int >> +_flush_cache (char *addr, const int nbytes, const int op) >> +{ >> + return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op); >> +} >> +weak_alias (_flush_cache,

Re: [PATCH 03/21] ARC: ABI Implementation

2018-12-18 Thread Vineet Gupta
On 12/18/18 3:09 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> +/* FLAG 1 is privilege mode only instruction, hence will crash any program >> */ > > Generally, throughout the port, make sure comments end ". " (full stop, > two spaces, end of comment). I won't remark

Re: [PATCH 04/21] ARC: startup and dynamic linking code

2018-12-18 Thread Vineet Gupta
On 12/18/18 3:24 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> +/* >> + * Dynamic Linking ABI for ARCv2 ISA >> + * > glibc does not use leading '*' on each line of a comment (needs fixing > throughout this file). OK ! ___

Re: [PATCH 07/21] ARC: math soft float support

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > > > +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__) > > Missing spaces before '(' (should have such spaces in most cases between > an identifier or keyword and '(' - calls to "defined", calls to

Re: [PATCH 21/21] NEWS: mention ARC port

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > @@ -1078,6 +1078,8 @@ Version 2.26 > > Major new features: > > +* Port to ARC HS cores has been contributed by Synopsys. > + Obviously this belongs under 2.29, or whatever version gets the port, not 2.26. -- Joseph S. Myers

Re: [PATCH 13/21] ARC: Build Infrastructure

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +libc { > + GLIBC_2.29 { > +__adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2; > +__fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi; > +__fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi; > +__floatdidf; __floatdisf;

Re: [PATCH 09/21] ARC: Linux ABI

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +typedef unsigned short int __pr_uid_t; > +typedef unsigned short int __pr_gid_t; Are you sure? I don't see an ARC-specific definition of __kernel_uid_t or __kernel_gid_t in the Linux kernel at all (which would mean unsigned int is actually used and

Re: [PATCH 08/21] ARC: Linux Syscall Interface

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +/* Flush cache(s). */ > +int > +_flush_cache (char *addr, const int nbytes, const int op) > +{ > + return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op); > +} > +weak_alias (_flush_cache, cacheflush) Can't this use a syscalls.list entry instead of

Re: [PATCH 04/21] ARC: startup and dynamic linking code

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +/* > + * Dynamic Linking ABI for ARCv2 ISA > + * glibc does not use leading '*' on each line of a comment (needs fixing throughout this file). -- Joseph S. Myers jos...@codesourcery.com ___ linux-snps-arc

Re: [PATCH 07/21] ARC: math soft float support

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__) Missing spaces before '(' (should have such spaces in most cases between an identifier or keyword and '(' - calls to "defined", calls to functions, calls to macros, __attribute__, etc. - except

Re: [PATCH 06/21] ARC: Atomics and Locking primitives

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +#define USE_ATOMIC_COMPILER_BUILTINS 0 There is a strong preference for new ports to use 1 for this rather than 0 (and not to have any asms in their atomic-machine.h unless there's some reason use of built-in functions is unsuitable) - see the

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

2018-12-18 Thread Joseph Myers
Another general point: when posting a new port, could you include pointers to architecture and ABI reference manuals in case those are of relevance to the review? (URLs going directly to PDFs of those manuals are preferred.) -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints

2018-12-18 Thread Vineet Gupta
On 12/18/18 2:56 PM, Joseph Myers wrote: >> * sysdeps/unix/make-syscalls.sh: Fix comment referencing >> syscall-template file. >> +* stdlib/longlong.h: Fix asm constraints for ARC code. > > I don't see the above context in the current checked-in ChangeLog file. > Patch 1 in a

Re: [PATCH 03/21] ARC: ABI Implementation

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > +/* FLAG 1 is privilege mode only instruction, hence will crash any program */ Generally, throughout the port, make sure comments end ". " (full stop, two spaces, end of comment). I won't remark on other places with this formatting issue. > diff

Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start

2018-12-18 Thread Vineet Gupta
On 12/18/18 2:59 PM, Joseph Myers wrote: >> I deliberately kept them out to call out the fixes, sometimes these help >> new ports which stumble into similar issues. And also ~2 years worth of >> work gets squashed into a single blob is a shame :-) > > Postings of a new port should generally post

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

2018-12-18 Thread Vineet Gupta
On 12/18/18 2:52 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> | FAIL: elf/check-localplt # passes for build-many-glibcs.py >> # buildroot builds with slightly >> different toggles (-Os) >>

Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > On 12/18/18 1:28 PM, Florian Weimer wrote: > >> ARC linker scripts have defined __start as entry point so to not break > >> ABI for uClibc et al we allow __start for glibc as well > > I think this change and the test suite fixes should be folded into the

Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > diff --git a/ChangeLog b/ChangeLog > index 027b23493ed8..456e4b670c23 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -2,6 +2,7 @@ > > * sysdeps/unix/make-syscalls.sh: Fix comment referencing > syscall-template file. > + *

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

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Vineet Gupta wrote: > | FAIL: elf/check-localplt# passes for build-many-glibcs.py > # buildroot builds with slightly > different toggles (-Os) > # such that gcc generates an extra >

Re: [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext

2018-12-18 Thread Andreas Schwab
On Dez 18 2018, Vineet Gupta wrote: > diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S > b/sysdeps/unix/sysv/linux/arc/setcontext.S > index 3f503c661d95..6ec2ec0ddc79 100644 > --- a/sysdeps/unix/sysv/linux/arc/setcontext.S > +++ b/sysdeps/unix/sysv/linux/arc/setcontext.S > @@ -79,6 +79,8

Re: [PATCH 11/21] ARC: ABI lists

2018-12-18 Thread Vineet Gupta
On 12/18/18 2:31 PM, Andreas Schwab wrote: >> sysdeps/unix/sysv/linux/arc/libnsl.abilist | 120 ++ > You don't need that any more. Ok ! deleted now ! Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

[PATCH 12/25] clocksource/drivers/arc_timer: Utilize generic sched_clock

2018-12-18 Thread Daniel Lezcano
From: Alexey Brodkin It turned out we used to use default implementation of sched_clock() from kernel/sched/clock.c which was as precise as 1/HZ, i.e. by default we had 10 msec granularity of time measurement. Now given ARC built-in timers are clocked with the same frequency as CPU cores we may

Re: [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls

2018-12-18 Thread Vineet Gupta
On 12/18/18 1:26 PM, Florian Weimer wrote: > This should come in with a sync with a released upstream kernel. Will > the port be in Linux 4.20? linux port was upstreamed in 2013 in v3.9 -Vineet ___ linux-snps-arc mailing list

Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start

2018-12-18 Thread Vineet Gupta
On 12/18/18 1:28 PM, Florian Weimer wrote: >> ARC linker scripts have defined __start as entry point so to not break >> ABI for uClibc et al we allow __start for glibc as well > I think this change and the test suite fixes should be folded into the > initial addition of these files. Or is there a

Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start

2018-12-18 Thread Florian Weimer
* Vineet Gupta: > ARC linker scripts have defined __start as entry point so to not break > ABI for uClibc et al we allow __start for glibc as well I think this change and the test suite fixes should be folded into the initial addition of these files. Or is there a reason for not doing this?

Re: [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls

2018-12-18 Thread Florian Weimer
* Vineet Gupta: > diff --git a/sysdeps/unix/sysv/linux/syscall-names.list > b/sysdeps/unix/sysv/linux/syscall-names.list > index f88001c9c38d..62862010600f 100644 > --- a/sysdeps/unix/sysv/linux/syscall-names.list > +++ b/sysdeps/unix/sysv/linux/syscall-names.list > @@ -42,6 +42,9 @@ adjtimex >

[PATCH 20/21] build-many-glibcs.py: Enable ARC builds

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog| 4 scripts/build-many-glibcs.py | 4 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 376d0e401117..46d288808153 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-12-17 Vineet Gupta +

[PATCH 18/21] ARC: testsuite fix: GD TLS issue

2018-12-18 Thread Vineet Gupta
From: Cupertino Miranda Offset set by the linker in the GOT entries would be overwritten by the dynamic loader instead of added to the symbol location. Other target have the same approach on DTSOFF relocs. Signed-off-by: Vineet Gupta --- ChangeLog| 4

[PATCH 16/21] ARC: testsuite fix: sysvipc/*

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 1 + sysdeps/unix/sysv/linux/arc/ipc_priv.h | 21 + 2 files changed, 22 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/arc/ipc_priv.h diff --git a/ChangeLog b/ChangeLog index

[PATCH 19/21] ARC: fix several unwining and cancelation tests

2018-12-18 Thread Vineet Gupta
From: Cupertino Miranda 1. Add dwarf CFI psuedo-ops to various syscall generators 2. Signature of sa_restorer was not what libgcc trampoline parser expects due to an intermediate mov instruction Signed-off-by: Vineet Gupta Signed-off-by: Cupertino Miranda --- ChangeLog

[PATCH 15/21] ARC: testsuite fix: elf/check-initfini

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 1 + sysdeps/arc/crti.S | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 86e4db890850..909b1af09a31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -108,6 +108,7 @@ * sysdeps/arc/dl-machine.h: replace _start

[PATCH 21/21] NEWS: mention ARC port

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 1 + NEWS | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 46d288808153..92e19ac45df2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2018-12-17 Vineet Gupta * scripts/build-many-glibcs.py:

[PATCH 06/21] ARC: Atomics and Locking primitives

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 3 ++ sysdeps/arc/atomic-machine.h | 89 +++ sysdeps/arc/nptl/bits/pthreadtypes-arch.h | 72 + sysdeps/arc/nptl/bits/semaphore.h | 32 +++

[PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext

2018-12-18 Thread Vineet Gupta
Terminate the unwinding by telling unwinder to fetch return address (BLINK) from r15 which has been set apriori to 0. Signed-off-by: Vineet Gupta --- ChangeLog | 2 ++ sysdeps/unix/sysv/linux/arc/makecontext.c | 1 + sysdeps/unix/sysv/linux/arc/setcontext.S | 2

[PATCH 11/21] ARC: ABI lists

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 17 + sysdeps/arc/nofpu/libm-test-ulps | 390 sysdeps/arc/nofpu/libm-test-ulps-name |1 + sysdeps/unix/sysv/linux/arc/c++-types.data | 67 +

[PATCH 10/21] ARC: Linux Startup and Dynamic Loading

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 3 ++ sysdeps/unix/sysv/linux/arc/dl-static.c | 84 + sysdeps/unix/sysv/linux/arc/ldconfig.h | 25 ++ sysdeps/unix/sysv/linux/arc/ldsodefs.h | 32 + 4 files changed,

[PATCH 03/21] ARC: ABI Implementation

2018-12-18 Thread Vineet Gupta
This code deals with the ARC ABI. Signed-off-by: Vineet Gupta --- ChangeLog| 20 sysdeps/arc/__longjmp.S | 50 sysdeps/arc/abort-instr.h| 2 ++ sysdeps/arc/bits/endian.h| 12 +++ sysdeps/arc/bits/setjmp.h| 33

[PATCH 05/21] ARC: Thread Local Storage support

2018-12-18 Thread Vineet Gupta
This includes all 4 TLS addressing models Signed-off-by: Vineet Gupta --- ChangeLog| 5 ++ sysdeps/arc/dl-tls.h | 30 sysdeps/arc/libc-tls.c | 27 +++ sysdeps/arc/nptl/tcb-offsets.sym | 11 +++ sysdeps/arc/nptl/tls.h |

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

2018-12-18 Thread Vineet Gupta
Code for C runtime startup and dynamic loading including PLT layout. Signed-off-by: Vineet Gupta --- ChangeLog | 6 + sysdeps/arc/bits/link.h | 52 sysdeps/arc/dl-machine.h | 333 ++ sysdeps/arc/ldsodefs.h| 43

[PATCH 08/21] ARC: Linux Syscall Interface

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 12 ++ sysdeps/unix/sysv/linux/arc/cacheflush.c | 29 +++ sysdeps/unix/sysv/linux/arc/clone.S | 100 ++ sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h | 6 +

[PATCH 07/21] ARC: math soft float support

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog| 6 +++ sysdeps/arc/bits/fenv.h | 92 sysdeps/arc/math_private.h | 6 +++ sysdeps/arc/nofpu/Implies| 1 +

[PATCH 13/21] ARC: Build Infrastructure

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 13 + sysdeps/arc/Implies| 3 +++ sysdeps/arc/Makefile | 25 + sysdeps/arc/Versions | 14 ++

[PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start

2018-12-18 Thread Vineet Gupta
ARC linker scripts have defined __start as entry point so to not break ABI for uClibc et al we allow __start for glibc as well Signed-off-by: Vineet Gupta --- ChangeLog| 3 +++ sysdeps/arc/dl-machine.h | 14 ++ sysdeps/arc/entry.h | 5 +

[PATCH 09/21] ARC: Linux ABI

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 15 + sysdeps/arc/nptl/pthread-offsets.h| 5 ++ sysdeps/arc/nptl/pthreaddef.h | 32 + sysdeps/unix/sysv/linux/arc/bits/procfs-id.h | 25 +++

[PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 1 + sysdeps/unix/sysv/linux/syscall-names.list | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4182e89ccbb3..3735df67a3b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -91,6 +91,7 @@

[PATCH 00/21] glibc port to ARC processors

2018-12-18 Thread Vineet Gupta
Hi, This is reposting of glibc port to ARC processors from synopsys. The original posting was a while back [1]. The issues at the time were (1). Need for working upstream gcc/binutils (vs. the github forks) (2). Too many testsuite failures. All the ducks seem to be in a row now, with last

[PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints

2018-12-18 Thread Vineet Gupta
This corresponds to the version Author: law Date: Tue Jun 27 16:10:15 2017 + * longlong.h: Remove ns32k support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249696 138bc75d-0d04-0410-961f-82ee72b054a4 Signed-off-by: Vineet Gupta --- ChangeLog | 1 +

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

2018-12-18 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 1 + elf/elf.h | 70 ++- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 456e4b670c23..3ec6eb82d2fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6

[PATCH 2/2] ARC: show_regs: fix lockdep splat for good

2018-12-18 Thread Vineet Gupta
signal handling core calls ARCH show_regs() with preemption disabled which causes __might_sleep functions such as mmput leading to lockdep splat. Workaround by re-enabling preemption temporarily. This may not be as bad as it sounds since the preemption disabling itself was introduced for a

[PATCH 0/2] ARC show_regs fixes

2018-12-18 Thread Vineet Gupta
Vineet Gupta (2): ARC: show_regs: avoid page allocator ARC: show_regs: fix lockdep splat for good arch/arc/kernel/troubleshoot.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) -- 2.7.4 ___ linux-snps-arc

[PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-18 Thread Vineet Gupta
Use on-stack smaller buffers instead of dynamic pages. The motivation for this change was to address lockdep splat when signal handling code calls show_regs (with preemption disabled) and ARC show_regs calls into sleepable page allocator. | potentially unexpected fatal signal 11. | BUG: sleeping

Re: [PATCH] testsuite fix: timezone: failing due to permissions in cross testing

2018-12-18 Thread Joseph Myers
On Tue, 18 Dec 2018, Florian Weimer wrote: > There are also some xtests that require root privileges, such as > nptl/tst-setuid1. Building and testing as root is supported (but That looks like it ought to become a test using user namespaces (and so not an xtest). > obviously not recommended

Re: [PATCH] testsuite fix: timezone: failing due to permissions in cross testing

2018-12-18 Thread Vineet Gupta
On 12/17/18 3:25 PM, Joseph Myers wrote: > root should not be involved in running tests at all; all tests should run > as a normal user, the same one that owns the build directory, and thus all > files and directories in the build directory should be owned by that user. > (Some tests use user

Re: [PATCH] testsuite fix: timezone: failing due to permissions in cross testing

2018-12-18 Thread Florian Weimer
* Joseph Myers: > On Mon, 17 Dec 2018, Vineet Gupta wrote: > >> timezone test driver "zic" creates testdata directory wuth umask 755, so >> only root owner/group has write permissions. However the buildroot > > root should not be involved in running tests at all; all tests should run > as a