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

2019-01-29 Thread Joseph Myers
In the absence of clear consensus regarding consideration of new ports to undocumented architectures (which would need to result in consensus on suitable rules on the subject to go in ), and in the absence of suitable public architecture and ABI

Re: [PATCH v2 15/15] make-syscalls.sh: fix comment referencing syscall-template

2019-01-29 Thread Joseph Myers
This particular patch is OK after 2.29 has been released and master has opened for 2.30 development, but such architecture-independent fixes ought not be considered part of the port submission (see ). -- Joseph S. Myers jos...@codesourcery.com

[PATCH v2 14/15] NEWS: mention ARC port

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 1 + NEWS | 7 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 63418806d331..8c1fc3d2cdcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -100,6 +100,7 @@ * sysdeps/unix/sysv/linux/arc/configure.ac: New file.

[PATCH v2 04/15] ARC: Thread Local Storage support

2019-01-29 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 v2 13/15] build-many-glibcs.py: Enable ARC builds

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog| 1 + scripts/build-many-glibcs.py | 4 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index d8ecb7d233c5..63418806d331 100644 --- a/ChangeLog +++ b/ChangeLog @@ -99,6 +99,7 @@ *

[PATCH v2 05/15] ARC: Atomics and Locking primitives

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 3 ++ sysdeps/arc/atomic-machine.h | 73 +++ sysdeps/arc/nptl/bits/pthreadtypes-arch.h | 72 ++ sysdeps/arc/nptl/bits/semaphore.h | 32

[PATCH v2 08/15] ARC: Linux ABI

2019-01-29 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.h | 35

[PATCH v2 01/15] ARC: add definitions to elf/elf.h

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 4 elf/elf.h | 70 ++- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23c20066a4a6..e2091865afb5 100644 --- a/ChangeLog +++ b/ChangeLog @@

[PATCH v2 00/15] glibc port to ARC processors

2019-01-29 Thread Vineet Gupta
Hi, v2 of glibc port to ARC processors from Synopsys. Thx for reviewing the v1 [1], I've hopefully addressed all the comments. Any unlikely omissions are unintended. Also apologies for the bad timing given the imminent release, but that ship has likely already sailed, so we might as well

[PATCH v2 09/15] ARC: Linux Startup and Dynamic Loading

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 2 + sysdeps/unix/sysv/linux/arc/dl-static.c | 84 + sysdeps/unix/sysv/linux/arc/ldsodefs.h | 32 + 3 files changed, 118 insertions(+) create mode 100644

[PATCH v2 11/15] ARC: Update syscall-names.list for ARC specific syscalls

2019-01-29 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 55d185c2a189..3fb8c7c14cae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -85,6 +85,7 @@

[PATCH v2 10/15] ARC: ABI lists

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 16 + 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 v2 03/15] ARC: startup and dynamic linking code

2019-01-29 Thread Vineet Gupta
Code for C runtime startup and dynamic loading including PLT layout. Signed-off-by: Vineet Gupta --- ChangeLog | 7 + sysdeps/arc/bits/link.h | 52 +++ sysdeps/arc/dl-machine.h | 340 ++ sysdeps/arc/entry.h | 5 +

[PATCH v2 12/15] ARC: Build Infrastructure

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 13 + sysdeps/arc/Implies| 4 sysdeps/arc/Makefile | 25 + sysdeps/arc/Versions | 6 ++

[PATCH v2 06/15] ARC: math soft float support

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 5 +++ sysdeps/arc/bits/fenv.h | 72 ++ sysdeps/arc/nofpu/Implies | 1 + sysdeps/arc/nofpu/math-tests-exceptions.h | 27

[PATCH v2 02/15] ARC: ABI Implementation

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

[PATCH v2 07/15] ARC: Linux Syscall Interface

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 13 ++ sysdeps/unix/sysv/linux/arc/clone.S | 98 ++ sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h | 6 + sysdeps/unix/sysv/linux/arc/kernel-features.h | 28 +++

[PATCH v2 15/15] make-syscalls.sh: fix comment referencing syscall-template

2019-01-29 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- ChangeLog | 2 ++ sysdeps/unix/make-syscalls.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8c1fc3d2cdcb..3c73507df5f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -101,6 +101,8 @@ *

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

2019-01-29 Thread Vineet Gupta
On 12/20/18 3:24 PM, Joseph Myers wrote: > On Thu, 20 Dec 2018, Vineet Gupta wrote: > >> On 12/19/18 2:17 PM, Joseph Myers wrote: >>> I should note a separate issue to consider: that of *static* PIE support. >>> That doesn't need to be working, but if it's not working, >> >> Aren't there

Re: [PATCH 5/5] ARCv2: LIB: MEMCPY: fixed and optimised routine

2019-01-29 Thread Vineet Gupta
On 1/29/19 2:49 AM, Eugeniy Paltsev wrote: > Optimise code to use efficient unaligned memory access which is > available on ARCv2. This allows us to really simplify memcpy code > and speed up the code one and a half times (in case of unaligned > source or destination). > > Signed-off-by: Eugeniy

Re: [PATCH 2/5] ARCv2: introduce unaligned access under a Kconfig option

2019-01-29 Thread Vineet Gupta
On 1/29/19 2:49 AM, Eugeniy Paltsev wrote: > As of today we enable unaligned access unconditionally on ARCv2. > Lets move it under Kconfig option so we can disable it in case of > using HW configuration which lacks of it. > > Signed-off-by: Eugeniy Paltsev > --- > arch/arc/Kconfig

Re: [PATCH 1/2] ARCv2: Enable unaligned access in early ASM code

2019-01-29 Thread Eugeniy Paltsev
On Tue, 2019-01-29 at 09:28 -0800, Vineet Gupta wrote: > On 1/29/19 9:26 AM, Eugeniy Paltsev wrote: > > > I presume there is no specific reason to include this conditionally. > > > irqflags.h already includes the right version. > > > > Agree. > > I've just forgotten about common irqflags.h > >

Re: [PATCH 1/2] ARCv2: Enable unaligned access in early ASM code

2019-01-29 Thread Vineet Gupta
On 1/29/19 9:26 AM, Eugeniy Paltsev wrote: >> I presume there is no specific reason to include this conditionally. >> irqflags.h already includes the right version. > Agree. > I've just forgotten about common irqflags.h No need for this series. Given Alexey's request, I've pushed the minimal

Re: [PATCH 1/2] ARCv2: Enable unaligned access in early ASM code

2019-01-29 Thread Eugeniy Paltsev
On Tue, 2019-01-29 at 09:21 -0800, Vineet Gupta wrote: > On 1/16/19 3:29 AM, Eugeniy Paltsev wrote: > > Even though we do enable AD bit in arc_init_IRQ() we need to do > > it in early ASM code otherwise we may face unaligned data until > > we reach arc_init_IRQ() because GCC starting from v8.1.0

Re: [PATCH 1/2] ARCv2: Enable unaligned access in early ASM code

2019-01-29 Thread Vineet Gupta
On 1/16/19 3:29 AM, Eugeniy Paltsev wrote: > Even though we do enable AD bit in arc_init_IRQ() we need to do > it in early ASM code otherwise we may face unaligned data until > we reach arc_init_IRQ() because GCC starting from v8.1.0 actively > generates unaligned data as it assumes that: > *

Re: [PATCH 1/2] ARCv2: Enable unaligned access in early ASM code

2019-01-29 Thread Vineet Gupta
On 1/28/19 11:27 PM, Alexey Brodkin wrote: > Hi Vineet, > >> -Original Message- >> From: Eugeniy Paltsev >> Sent: Wednesday, January 16, 2019 2:30 PM >> To: linux-snps-arc@lists.infradead.org; Vineet Gupta >> Cc: linux-ker...@vger.kernel.org; Alexey Brodkin ; >> Eugeniy Paltsev >> >>

RE: [PATCH] [ARC]: Enable init_array support

2019-01-29 Thread Claudiu Zissulescu
2019-xx-xx Vineet Gupta * gcc/config.gcc: Force .init_array for ARC Signed-off-by: Vineet Gupta --- Hi, Thank you for your contribution. I'll push it asap. Cheers, Claudiu ___ linux-snps-arc mailing list

Re: [PATCH] ARC: [plat-hsdk]: Add support of Vivante GPU

2019-01-29 Thread Lucas Stach
Am Dienstag, den 29.01.2019, 15:41 +0300 schrieb Eugeniy Paltsev: > HSDK board has built-in Vivante GPU IP which works perfectly fine > with Etnaviv driver, so let's use it. > > > Signed-off-by: Eugeniy Paltsev > --- > NOTE: >  * this patch has prerequisite: >    

[PATCH] ARC: [plat-hsdk]: Add support of Vivante GPU

2019-01-29 Thread Eugeniy Paltsev
HSDK board has built-in Vivante GPU IP which works perfectly fine with Etnaviv driver, so let's use it. Signed-off-by: Eugeniy Paltsev --- NOTE: * this patch has prerequisite: https://patchwork.kernel.org/patch/10766265/ arch/arc/boot/dts/hsdk.dts | 6 ++

[PATCH 2/5] ARCv2: introduce unaligned access under a Kconfig option

2019-01-29 Thread Eugeniy Paltsev
As of today we enable unaligned access unconditionally on ARCv2. Lets move it under Kconfig option so we can disable it in case of using HW configuration which lacks of it. Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig | 8

[PATCH 0/5] introduce unaligned access under a Kconfig option

2019-01-29 Thread Eugeniy Paltsev
As of today we enable unaligned access unconditionally on ARCv2. Lets move it under Kconfig option and use it actively in SW if it is enabled. While I'm at it fix and optimise ARCv2 memcpy implementaion. Eugeniy Paltsev (5): ARCv2: lib: memcpy: fix doing prefetchw outside of buffer ARCv2:

[PATCH 3/5] ARCv2: Enable unaligned access in early ASM code

2019-01-29 Thread Eugeniy Paltsev
Even though we do enable AD bit in arc_init_IRQ() we need to do it in early ASM code otherwise we may face unaligned data until we reach arc_init_IRQ() because GCC starting from v8.1.0 actively generates unaligned data as it assumes that: * ARCv2 always has support of unaliged data * This

[PATCH 1/5] ARCv2: lib: memcpy: fix doing prefetchw outside of buffer

2019-01-29 Thread Eugeniy Paltsev
ARCv2 optimized memcpy uses PREFETCHW instruction for prefetching the next cache line but doesn't ensure that the line is not past the end of the buffer. PRETECHW changes the line ownership and marks it dirty, which can cause data corruption if this area is used for DMA IO. Fix the issue by

[PATCH 5/5] ARCv2: LIB: MEMCPY: fixed and optimised routine

2019-01-29 Thread Eugeniy Paltsev
Optimise code to use efficient unaligned memory access which is available on ARCv2. This allows us to really simplify memcpy code and speed up the code one and a half times (in case of unaligned source or destination). Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig |

[PATCH 4/5] ARCv2: use unaligned access in SW

2019-01-29 Thread Eugeniy Paltsev
Select HAVE_EFFICIENT_UNALIGNED_ACCESS and allow GCC to generate unaligned data if we enable enable unaligned access in HW. Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig | 1 + arch/arc/Makefile | 6 ++ 2 files changed, 7 insertions(+) diff --git a/arch/arc/Kconfig

Re: [PATCH v2 09/21] memblock: drop memblock_alloc_base()

2019-01-29 Thread Michael Ellerman
Mike Rapoport writes: > The memblock_alloc_base() function tries to allocate a memory up to the > limit specified by its max_addr parameter and panics if the allocation > fails. Replace its usage with memblock_phys_alloc_range() and make the > callers check the return value and panic in case of

Re: [PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-29 Thread Michael Ellerman
Michael Ellerman writes: > Mike Rapoport writes: > >> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c >> index ae34e3a..2c61ea4 100644 >> --- a/arch/arm64/mm/numa.c >> +++ b/arch/arm64/mm/numa.c >> @@ -237,6 +237,10 @@ static void __init setup_node_data(int nid, u64 >> start_pfn, u64

Re: [PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-29 Thread Michael Ellerman
Mike Rapoport writes: > diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c > index ae34e3a..2c61ea4 100644 > --- a/arch/arm64/mm/numa.c > +++ b/arch/arm64/mm/numa.c > @@ -237,6 +237,10 @@ static void __init setup_node_data(int nid, u64 > start_pfn, u64 end_pfn) >

Re: [PATCH v2 02/21] powerpc: use memblock functions returning virtual address

2019-01-29 Thread Michael Ellerman
Mike Rapoport writes: > From: Christophe Leroy > > Since only the virtual address of allocated blocks is used, > lets use functions returning directly virtual address. > > Those functions have the advantage of also zeroing the block. > > [ MR: > - updated error message in alloc_stack() to be