Re: [RFC 1/2] ARC: U-boot: check arguments paranoidly

2019-02-06 Thread Vineet Gupta
On 2/6/19 9:22 AM, Eugeniy Paltsev wrote: > Handle U-boot arguments paranoidly: > * don't allow to pass unknown tag. > * try to use external device tree blob only if corresponding tag >(TAG_DTB) is set. > * don't check: uboot_tag if kernel build with no ARC_UBOOT_SUPPORT. > > While I'm at

Re: [RFC 2/2] ARC: U-boot: check magic number passed from u-boot

2019-02-06 Thread Vineet Gupta
On 2/6/19 9:22 AM, Eugeniy Paltsev wrote: > In case of devboards we really often disable bootloader and load > Linux image in memory via JTAG. In case of using kernel with > CONFIG_ARC_UBOOT_SUPPORT enabled we may crash as we will try to > interpret some junk in a registers as a pointers to

Re: [RFC 1/2] ARC: U-boot: check arguments paranoidly

2019-02-06 Thread Vineet Gupta
On 2/6/19 9:22 AM, Eugeniy Paltsev wrote: > Handle U-boot arguments paranoidly: > * don't allow to pass unknown tag. > * try to use external device tree blob only if corresponding tag >(TAG_DTB) is set. > * don't check: uboot_tag if kernel build with no ARC_UBOOT_SUPPORT. > > While I'm at

[PATCH] ARCv2: support manual regfile save on interrupts

2019-02-05 Thread Vineet Gupta
There's a hardware bug which affects the HSDK platform, triggered by micro-ops for auto-saving regfile on taken interrupt. The workaround is to inhibit autosave. Signed-off-by: Vineet Gupta --- arch/arc/Kconfig | 8 ++ arch/arc/include/asm/entry-arcv2.h | 54

Re: [PATCH] ARC: fix actionpoints configuration detection

2019-02-05 Thread Vineet Gupta
On 2/4/19 10:41 AM, Eugeniy Paltsev wrote: > Fix reversed logic while actionpoints configuration (full/min) > detection. > > Fixies: 7dd380c338f1e ("ARC: boot log: print Action point details") > Signed-off-by: Eugeniy Paltsev LGTM. Thx, -vineet > --- > arch/arc/kernel/setup.c | 2 +- > 1

Re: [PATCH 2/2] arc: hsdk_defconfig: enable CONFIG_ARC_UBOOT_SUPPORT

2019-02-05 Thread Vineet Gupta
On 2/5/19 3:42 AM, Eugeniy Paltsev wrote: > Hi Corentin, > > In case of devboards (like HSDK) we really often disable bootloader and load > Linux image in memory via JTAG. Enabling CONFIG_ARC_UBOOT_SUPPORT by > default will break it as we will try to interpret some junk in a registers > as a

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

2019-02-01 Thread Vineet Gupta
On 1/30/19 8:32 AM, Eugeniy Paltsev wrote: > 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. > > Changes v1->v2: > * Rebase onto

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

2019-02-01 Thread Vineet Gupta
On 2/1/19 3:28 PM, Vineet Gupta wrote: > Guess there's no solution to this. We could force select the option in > relevant > Kconfig, but this applies to pretty much every platform and defeats the > purpose of > option in first place. Answering my own question: #if defined(__

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

2019-02-01 Thread Vineet Gupta
On 1/30/19 8:32 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

[PATCH] [ARC] don't force _init/_fini as DT_INIT/DT_FINI

2019-02-01 Thread Vineet Gupta
ny uClibc/glibc testsuite results, so this can RIP anyways. bfd/ 2019-02-01 Vineet Gupta * elf32-arc.c: Delete init_str, fini_str ld/ 2019-02-01 Vineet Gupta * emultempl/arclinux.em : Delete special INIT/FINI handling. Signed-off-by: Vineet Gupta --- bfd/ChangeLog

Need for arch pthread-offsets.h (was Re: [PATCH v2 05/15] ARC: Atomics and Locking primitives)

2019-01-31 Thread Vineet Gupta
On 1/30/19 9:40 AM, Vineet Gupta wrote: > On 1/30/19 12:28 AM, Andreas Schwab wrote: >> On Jan 29 2019, Vineet Gupta wrote: >> >>> +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 >>> +#define __PTHREAD_MUTEX_USE_UNION 1 >> New ports should use the pre

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

2019-01-31 Thread Vineet Gupta
On 1/31/19 5:45 PM, Carlos O'Donell wrote: > On 1/31/19 7:16 PM, Vineet Gupta wrote: >> spotted when started working on ARC port to glibc >> >> --- >> ChangeLog | 5 + >> sysdeps/unix/make-syscalls.sh | 2 +- >> 2 fil

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

2019-01-31 Thread Vineet Gupta
+1,8 @@ +2019-01-31 Vineet Gupta + + * sysdeps/unix/make-syscalls.sh: Fix comment referencing + syscall-template file. + 2019-01-31 Paul Pluzhnikov [BZ #24051] diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh index e39b2d6d5214..6a5c10d54e87

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

2019-01-30 Thread Vineet Gupta
On 1/30/19 1:50 PM, Joseph Myers wrote: >>> This seems like something that could be a common issue for new ports, so >>> worth a mention at alongside >>> such things as using init_array and USE_ATOMIC_COMPILER_BUILTINS. >> Updated wiki page ! > Now

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

2019-01-30 Thread Vineet Gupta
On 1/30/19 1:04 PM, Joseph Myers wrote: >>> +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 >>> +#define __PTHREAD_MUTEX_USE_UNION 1 >> New ports should use the preferred values for these macros. > This seems like something that could be a common issue for new ports, so > worth a mention

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

2019-01-30 Thread Vineet Gupta
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 on the subject to go in > ), and in the

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

2019-01-30 Thread Vineet Gupta
On 1/30/19 12:28 AM, Andreas Schwab wrote: > On Jan 29 2019, Vineet Gupta wrote: > >> +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 >> +#define __PTHREAD_MUTEX_USE_UNION 1 > New ports should use the preferred values for these macros. OK, changed to 0 and 0 per c

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

2019-01-30 Thread Vineet Gupta
On 1/30/19 8:44 AM, Eugeniy Paltsev wrote: >> I'd prefer to change the define of STATUS_AD_MASK itself and keep all of this >> unchanged ! >> > Actually I'd prefer to leave STATUS_AD_MASK untouched. Otherwise we will > implicitly assign > wrong value to STATUS_AD_MASK which is quite misleading. >

[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 @@ * sysdeps/unix/sysv

[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 .../unix

[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
-arc-processors/glibc/files/2810200/glibc-testsuite-results-commit-2f9a78f208a7.log.gz Vineet Gupta (15): ARC: add definitions to elf/elf.h ARC: ABI Implementation ARC: startup and dynamic linking code ARC: Thread Local Storage support ARC: Atomics and Locking primitives ARC: math soft

[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 sysdeps/unix/sysv

[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 + sysdeps/unix/sysv

[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 ++ sysdeps/arc

[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 sysdeps/arc/nofpu/math

[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 +++ sysdeps/unix/sysv/linux/arc

[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

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 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 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;

[PATCH] [ARC]: Enable init_array support

2019-01-28 Thread Vineet Gupta
this for ARC. This has been discussed at length on glibc mailing list [1], [2] [1] https://sourceware.org/ml/libc-alpha/2018-11/msg00870.html [2] https://sourceware.org/ml/libc-alpha/2019-01/msg00656.html gcc/ 2019-xx-xx Vineet Gupta * gcc/config.gcc: Force .init_array for ARC Signed

Re: ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation)

2019-01-28 Thread Vineet Gupta
On 1/28/19 3:13 PM, Joseph Myers wrote: > This was discussed at length in the C-Sky discussion. In short: the > proper fix is to change that configure test to apply for cross compilation > as well, other than in the very limited case where it tries to run > something (but doing so is not

ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation)

2019-01-28 Thread Vineet Gupta
On 12/18/18 3:09 PM, Joseph Myers wrote: >> diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S > As a new port I think it would be best to use init_array in your Implies > file so you don't need these crti / crtn files, and make GCC generate > init_array / fini_array exclusively. (See RISC-V

Re: ensure dma_alloc_coherent always returns zeroed memory

2019-01-24 Thread Vineet Gupta
On 12/28/18 9:58 AM, h...@lst.de wrote: > On Fri, Dec 28, 2018 at 05:46:32PM +, Eugeniy Paltsev wrote: >> What happens: >> >> First coherent allocation (PAL#1): >> 1) allocate page via alloc_pages(__GFP_ZERO), got page vith paddr 0xbf2d6000 >> 2) zero it via memset [deep inside alloc_pages()]

Re: [PATCH v2] ARC: [scripted] fix node name and address spelling

2019-01-24 Thread Vineet Gupta
Hi Alexey, Rob, On 1/24/19 8:28 AM, Rob Herring wrote: > On Thu, Jan 24, 2019 at 6:17 AM Alexey Brodkin > wrote: >> >> From: Alexey Brodkin >> >> 1. Remove "0x" prefix from unit-address of node names >> --->8 >> sed -i 's/@0x/@/g'

[PATCH v2 1/3] coredump: Replace opencoded set_mask_bits()

2019-01-23 Thread Vineet Gupta
Cc: Alexander Viro Cc: Peter Zijlstra (Intel) Cc: linux-fsde...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Link: http://lkml.kernel.org/g/20150807115710.ga16...@redhat.com Reviewed-by: Anthony Yznaga Acked-by: Oleg Nesterov Signed-off-by: Vineet Gupta --- fs/exec.c | 7 +-- 1 file

[PATCH v2 2/3] fs: inode_set_flags() replace opencoded set_mask_bits()

2019-01-23 Thread Vineet Gupta
sibly come up with a generic llsc based implementation (w/o the cmpxchg loop) Cc: Alexander Viro Cc: Theodore Ts'o Cc: Peter Zijlstra (Intel) Cc: linux-fsde...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Anthony Yznaga Signed-off-by: Vineet Gupta --- fs/inode.c | 8 +--

[PATCH v2 0/3] Replace opencoded set_mask_bits

2019-01-23 Thread Vineet Gupta
Hi, Repost of [1] rebased on 5.0-rc3 + accumulated Acked-by/Reviewed-by. No code changes since v1. Please consider applying. [1] http://lists.infradead.org/pipermail/linux-snps-arc/2019-January/005201.html Thx, -Vineet Vineet Gupta (3): coredump: Replace opencoded set_mask_bits() fs

[PATCH v2 3/3] bitops.h: set_mask_bits() to return old value

2019-01-23 Thread Vineet Gupta
: Ingo Molnar Cc: Jani Nikula Cc: Chris Wilson Cc: Andrew Morton Reviewed-by: Anthony Yznaga Acked-by: Will Deacon Signed-off-by: Vineet Gupta --- include/linux/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h

Semantics of symbol address in perf report -v

2019-01-23 Thread Vineet Gupta
Hi, I noticed a small anomaly in perf report -v output on ARC and x86 as well. A simple program which sits in tight loop, compiled for x86_64 void main() { while(1) {} } $ gcc -g tight.c $ ./a.out & $ perf record -e cycles -p 26703 $ perf report -n -v --stdio | egrep "(main|Symbol)" |#

Re: misc/check-installed-headers-c failing due to upstream kernel change

2019-01-23 Thread Vineet Gupta
On 1/23/19 8:51 AM, Carlos O'Donell wrote: > On 1/23/19 10:57 AM, Ben Hutchings wrote: >> On Mon, 2019-01-21 at 14:56 -0800, Vineet Gupta wrote: >>> Hi, >>> >>> It seems a recent upstream kernel change (went in 5.0-rcX) 81c9d43f9487 >>> ("kern

Re: [PATCH] ARC: prevent showing irrelevant exception info in signal message

2019-01-21 Thread Vineet Gupta
On 1/21/19 9:07 AM, Eugeniy Paltsev wrote: > We process signals in the end of syscall/exception handler. > If the signal is fatal we print register's content using > show_regs function. show_regs() also prints information about > last exception happened. > > In case of multicore system we can

[GIT PULL] ARC updates for 5.0-rc3

2019-01-20 Thread Vineet Gupta
erf: introduce Kernel PMU events support ARC: perf: move HW events mapping to separate function ARC: perf: avoid kernel killing where it is possible ARCv2: lib: memeset: fix doing prefetchw outside of buffer Masahiro Yamada (1): arc: remove redundant kernel-space generic-y Vin

Re: [PATCH] arc: remove redundant kernel-space generic-y

2019-01-17 Thread Vineet Gupta
On 1/16/19 7:26 PM, Masahiro Yamada wrote: > This was not sent in the previous MW. > (Nor did I see ARC pull request.) > > Is it aiming for v5.1-rc1 ? Sorry for the delay, this will happen in next few days ! -Vineet ___ linux-snps-arc mailing list

Re: [PATCH 1/2] ARCv2: LIB: memeset: fix doing prefetchw outside of buffer

2019-01-15 Thread Vineet Gupta
On 1/15/19 4:00 AM, Eugeniy Paltsev wrote: >>> -#ifdef PREALLOC_NOT_AVAIL >>> - prefetchw [r3, 64] ;Prefetch the next write location >>> -#else >>> - prealloc [r3, 64] >>> -#endif >>> + PREALLOC_INSTR([r3, 64]) ;Prefetch the next write location >> These are not solving the issue - I'd

Re: [PATCH 1/2] ARCv2: LIB: memeset: fix doing prefetchw outside of buffer

2019-01-14 Thread Vineet Gupta
On 1/14/19 7:17 AM, Eugeniy Paltsev wrote: > Current ARCv2 memeset implementation may call 'prefetchw' > instruction for address which lies outside of memset area. > So we got one modified (dirty) cache line outside of memset > area. This may lead to data corruption if this area is used > for DMA

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

2019-01-14 Thread Vineet Gupta
On 12/18/18 3:15 PM, Joseph Myers wrote: > 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

Re: [PATCH 3/3] bitops.h: set_mask_bits() to return old value

2019-01-11 Thread Vineet Gupta
On 1/11/19 1:24 AM, Peter Zijlstra wrote: > diff --git a/include/linux/bitops.h b/include/linux/bitops.h > index 705f7c442691..2060d26a35f5 100644 > --- a/include/linux/bitops.h > +++ b/include/linux/bitops.h > @@ -241,10 +241,10 @@ static __always_inline void __assign_bit(long nr, > volatile

[PATCH 3/3] bitops.h: set_mask_bits() to return old value

2019-01-10 Thread Vineet Gupta
: Ingo Molnar Cc: Jani Nikula Cc: Chris Wilson Cc: Andrew Morton Cc: Will Deacon Signed-off-by: Vineet Gupta --- include/linux/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 705f7c442691..602af23b98c7

[PATCH 2/3] fs: inode_set_flags() replace opencoded set_mask_bits()

2019-01-10 Thread Vineet Gupta
sibly come up with a generic llsc based implementation (w/o the cmpxchg loop) Cc: Alexander Viro Cc: Theodore Ts'o Cc: Peter Zijlstra (Intel) Cc: linux-fsde...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Vineet Gupta --- fs/inode.c | 8 +--- 1 file changed, 1 in

[PATCH 1/3] coredump: Replace opencoded set_mask_bits()

2019-01-10 Thread Vineet Gupta
Cc: Alexander Viro Cc: Peter Zijlstra (Intel) Cc: linux-fsde...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Link: http://lkml.kernel.org/g/20150807115710.ga16...@redhat.com Acked-by: Oleg Nesterov Signed-off-by: Vineet Gupta --- fs/exec.c | 7 +-- 1 file changed, 1 insertion(+), 6

[PATCH 0/3] Replace opencoded set_mask_bits

2019-01-10 Thread Vineet Gupta
Hi, I did these a while back and forget. Rebased to 5.0-rc1. Please consider applying. Thx, -Vineet Vineet Gupta (3): coredump: Replace opencoded set_mask_bits() fs: inode_set_flags() replace opencoded set_mask_bits() bitops.h: set_mask_bits() to return old value fs/exec.c

Re: [PATCH v2 2/4] ARC: perf: introduce Kernel PMU events support

2019-01-10 Thread Vineet Gupta
ping ! Peter, does this look ok to you ? On 12/13/18 8:56 AM, Eugeniy Paltsev wrote: > Export all available ARC architected hardware events as > kernel PMU events to make non-generic events accessible. > > ARC PMU HW allow us to read the list of all available > events names. So we generate

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2019-01-09 Thread Vineet Gupta
On 12/21/18 4:05 AM, Adhemerval Zanella wrote: >> Thing is ARC signal return depends on a restorer. Meaning !SA_RESTORER >> doesn't >> effectively exist (between libc and kernel). We currently honor user provided >> value, instead we could simply overwrite it with default_rt_restorer and on >>

Re: [PATCH] ARC: show detaled ActionPoint configuration in mumbojumbo

2019-01-09 Thread Vineet Gupta
On 1/9/19 9:35 AM, Vineet Gupta wrote: > + cpu->extn.ap_full = !ap.min; This needs to be + cpu->extn.ap_full = !!ap.min; ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.or

Re: [PATCH] ARC: show detaled ActionPoint configuration in mumbojumbo

2019-01-09 Thread Vineet Gupta
On 12/28/18 8:44 AM, Eugeniy Paltsev wrote: > Add information about ActionPointis number and supported set > of targets (minimum / full). > > Signed-off-by: Eugeniy Paltsev > --- > arch/arc/include/asm/arcregs.h | 8 +++ > arch/arc/kernel/setup.c| 53 >

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

2018-12-21 Thread Vineet Gupta
On 12/19/18 12:36 PM, Joseph Myers wrote: > On Wed, 19 Dec 2018, Vineet Gupta wrote: > >> So perhaps we keep the ARC header above, with matching layout, while >> switching to generic sigaction() still. OK ? > > If the different userspace layout is better, it should be

[PATCH] rt/tst-posix_spawn: fix random crash due to uninitialized var

2018-12-21 Thread Vineet Gupta
000 by insn @ 0x20060c84 | [EFA ]: 0x | [BLINK ]: 0x20060bf4 | [ERET ]: 0x20060c84 | @off 0x52c84 in [/lib/libuClibc-1.0.29.so] | VMA: 0x2000e000 to 0x20072000 Signed-off-by: Vineet Gupta --- test/rt/tst-posix_spawn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/rt/

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

2018-12-21 Thread Vineet Gupta
On 12/21/18 10:46 AM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> This corresponds to the version >> >> Author: law >> Date: Tue Jun 27 16:10:15 2017 + >> >> * longlong.h: Remove ns32k support. > It se

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

2018-12-21 Thread Vineet Gupta
On 12/21/18 5:04 AM, Michal Hocko wrote: >> I presume you are referring to original commit, not my anti-change in ARC >> code, >> which is actually re-enabling it. > > Yes, but you are building on a broken concept I believe. Not sure where this is heading. Broken concept was introduced by

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

2018-12-21 Thread Vineet Gupta
On 12/21/18 6:32 AM, Joseph Myers wrote: > On Fri, 21 Dec 2018, Vineet Gupta wrote: > >> is due to linkage of a generic libgcc routine fp-bit.c > > I'd suggest moving from fp-bit to soft-fp in libgcc (soft-fp is a lot > faster, see the 2006 GCC Summit proceedings, though o

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

2018-12-20 Thread Vineet Gupta
On 12/18/18 3:52 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> At any rate, the generated code will likely be different for -Os and >> otherwise, >> does that mean entries get added conditionally to localplt.data etc ? > > Entrie

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

2018-12-20 Thread Vineet Gupta
On 12/18/18 3:23 PM, 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 '(' - call

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

2018-12-20 Thread Vineet Gupta
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 directed test cases for that already ? PASS: elf/tst-tls1-static PASS: elf/tst-tls1-static-non-pie FAIL:

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

2018-12-20 Thread Vineet Gupta
On 12/18/18 4:01 PM, Joseph Myers wrote: > 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 bet

test related questions (was Re: [PATCH 00/21] glibc port to ARC processors)

2018-12-20 Thread Vineet Gupta
On 12/18/18 1:04 PM, Vineet Gupta wrote: > (a) build-many-glibcs.py check results are clean > > | Summary of test results: > | 1173 PASS > | 15 XFAIL > | > | PASS: glibcs-arc-linux-gnu check One of the issues in running build-many incrementally, i.e. "host-li

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2018-12-20 Thread Vineet Gupta
On 12/20/18 4:07 AM, Arnd Bergmann wrote: > All users of sigset_t that I could find in the kernel just check > the size argument to ensure it matches _NSIG, and return > EINVAL otherwise. Indeed that was one of the very first problem ARC glibc port ran into with stock sizeof(sigset_t) passed in

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2018-12-20 Thread Vineet Gupta
On 12/20/18 3:19 AM, Adhemerval Zanella wrote: >>> #define SET_SA_RESTORER(kact, act) \ >>> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \ >>> (kact)->sa_restorer = &__default_rt_sa_restorer >> +#define SET_SA_RESTORER(kact, act) \ >> + ({

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2018-12-20 Thread Vineet Gupta
On 12/20/18 4:40 AM, Florian Weimer wrote: > * Adhemerval Zanella: > >> The only advantage of using a larger sigset_t from glibc standpoint is if >> kernel ever change it maximum number of supported signals it would not be >> a ABI change (it would be if glibc provided sigset_t need to be

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

2018-12-20 Thread Vineet Gupta
On 12/20/18 4:57 AM, Michal Hocko wrote: >> Despite this, lockdep still barfs (see next change), but this patch >> still has merit as in we use smaller/localized buffers now and there's >> less instructoh trace to sift thru when debugging pesky issues. > But show_regs is called from contexts which

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

2018-12-20 Thread Vineet Gupta
On 12/20/18 5:30 AM, Tetsuo Handa wrote: >> | mmput+0x16/0xb8 > Then, does mmput_async() help? Probably, I can try. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH] ARC: adjust memblock_reserve of kernel memory

2018-12-19 Thread Vineet Gupta
On 12/19/18 8:16 AM, Eugeniy Paltsev wrote: > In setup_arch_memory we reserve the memory area wherein the kernel > is located. Current implementation may reserve more memory than > it actually required in case of CONFIG_LINUX_LINK_BASE is not > equal to CONFIG_LINUX_RAM_BASE. This happens because

Re: [PATCH] ARC: adjust memblock_reserve of kernel memory

2018-12-19 Thread Vineet Gupta
On 12/19/18 8:16 AM, Eugeniy Paltsev wrote: > In setup_arch_memory we reserve the memory area wherein the kernel > is located. Current implementation may reserve more memory than > it actually required in case of CONFIG_LINUX_LINK_BASE is not > equal to CONFIG_LINUX_RAM_BASE. This happens because

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

2018-12-19 Thread Vineet Gupta
On 12/19/18 9:04 AM, Eugeniy Paltsev wrote: > As I can see x86 use print_vma_addr() in their show_signal_msg() > function which allocate page with __get_free_page(GFP_NOWAIT); Indeed with that the __get_free_page() lockdep splat is gone. There's a different one now hence my other patch. |

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

2018-12-19 Thread Vineet Gupta
On 12/19/18 4:14 PM, Joseph Myers wrote: > On Wed, 19 Dec 2018, Vineet Gupta wrote: > >> On 12/18/18 3:11 PM, Joseph Myers wrote: >>> Another general point: when posting a new port, could you include pointers >>> to architecture and ABI reference manuals

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

2018-12-19 Thread Vineet Gupta
On 12/18/18 3:11 PM, Joseph Myers wrote: > 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.) The PRM

Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2018-12-19 Thread Vineet Gupta
On 12/19/18 2:00 PM, Adhemerval Zanella wrote: > > > One possibility is to define an arch-specific __sigset_t.h with a custom > _SIGSET_NWORDS value and add an optimization on Linux sigaction.c to check > if both kernel_sigaction and glibc sigaction share same size and internal > layout to use

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

2018-12-19 Thread Vineet Gupta
On 12/18/18 3:44 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> +libc { >> + GLIBC_2.29 { >> +__adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2; >> +__fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi; >> +__fi

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

2018-12-19 Thread Vineet Gupta
On 12/19/18 12:46 PM, William Kucharski wrote: > I would rather see 256 as a #define somewhere rather than a magic number > sprinkled > around arch/arc/kernel/troubleshoot.c. That bothered me as well, but I was too lazy to define one and the existing ones don't apply. PATH_MAX is 4K which will

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

2018-12-19 Thread Vineet Gupta
On 12/18/18 1:28 PM, Florian Weimer wrote: > 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? As suggested by other reviewers too, I'm folding all fixes into initial files. Thx, -Vineet

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

2018-12-19 Thread Vineet Gupta
On 12/18/18 3:49 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h >> b/sysdeps/unix/sysv/linux/arc/ldconfig.h > > This header should only be needed if you support multiple ABIs > simultaneous

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

2018-12-19 Thread Vineet Gupta
On 12/19/18 9:40 AM, Joseph Myers wrote: > Architecture maintainers need wiki accounts in any case (to post test > results for their architectures during every release freeze period), so > you should create an account and post its name so someone can add it to > EditorGroup so you can edit.

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

2018-12-19 Thread Vineet Gupta
On 12/18/18 3:38 PM, Joseph Myers wrote: > 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? No I'm not :-) There were some interim sweeping changes in this area

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

2018-12-19 Thread Vineet Gupta
On 12/18/18 3:45 PM, Joseph Myers wrote: > Obviously this belongs under 2.29, or whatever version gets the port, not > 2.26. oops, left over from original code, now fixed and beefed up the details a bit. ___ linux-snps-arc mailing list

ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)

2018-12-19 Thread Vineet Gupta
On 12/18/18 6:39 PM, Vineet Gupta wrote: >>> diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c >>> b/sysdeps/unix/sysv/linux/arc/sigaction.c >> Why do you need this, rather than using the unified version (possibly with >> a few macros defined first)? > &

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

2018-12-19 Thread Vineet Gupta
On 12/19/18 9:04 AM, Eugeniy Paltsev wrote: > Just curious: isn't that enough to use GFP_NOWAIT instead > of GFP_KERNEL when we allocate page in show_regs()? > > As I can see x86 use print_vma_addr() in their show_signal_msg() > function which allocate page with __get_free_page(GFP_NOWAIT); I'm

Re: [PATCH] arc: remove redundant kernel-space generic-y

2018-12-19 Thread Vineet Gupta
On 12/19/18 7:16 AM, Masahiro Yamada wrote: > Could you pick this up to your arc tree? Done, will push it in a day or so ! Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

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)

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 spa

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 &

<    5   6   7   8   9   10   11   12   13   14   >