Re: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Peter Zijlstra
On Wed, Feb 13, 2019 at 03:23:36PM -0800, Vineet Gupta wrote: > On 2/13/19 4:56 AM, Peter Zijlstra wrote: > > > > Personally I think u64 and company should already force natural > > alignment; but alas. > > But there is an ISA/ABI angle here too. e.g. On 32-bit ARC, LDD (load double) > is >

RE: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Alexey Brodkin
Hi Peter, > -Original Message- > From: Peter Zijlstra > Sent: Thursday, February 14, 2019 1:32 PM > To: Vineet Gupta > Cc: David Laight ; Alexey Brodkin > ; linux-snps- > a...@lists.infradead.org; Arnd Bergmann ; > linux-ker...@vger.kernel.org; > sta...@vger.kernel.org; Mark Rutland

Re: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Peter Zijlstra
On Thu, Feb 14, 2019 at 10:44:49AM +, Alexey Brodkin wrote: > > On Wed, Feb 13, 2019 at 03:23:36PM -0800, Vineet Gupta wrote: > > > On 2/13/19 4:56 AM, Peter Zijlstra wrote: > > > > > > > > Personally I think u64 and company should already force natural > > > > alignment; but alas. > > > > > >

Re: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Peter Zijlstra
On Thu, Feb 14, 2019 at 08:50:43AM +, Alexey Brodkin wrote: > But that's pretty much the same for other 32-bit arches that have 64-bit > atomics > like ARM etc. From what I may see from ARM's documentation for LDREXD/SRREXD > they > require double-word alignment of data as well. > > That

RE: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Alexey Brodkin
Hi Vineet, Peter, all, > -Original Message- > From: Vineet Gupta > Sent: Thursday, February 14, 2019 2:24 AM > To: Peter Zijlstra > Cc: David Laight ; Alexey Brodkin > ; linux-snps- > a...@lists.infradead.org; Arnd Bergmann ; > linux-ker...@vger.kernel.org; > sta...@vger.kernel.org;

RE: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Alexey Brodkin
Hi Peter, > -Original Message- > From: linux-snps-arc On Behalf > Of Peter Zijlstra > Sent: Thursday, February 14, 2019 2:08 PM > To: Alexey Brodkin > Cc: Mark Rutland ; Vineet Gupta > ; linux- > ker...@vger.kernel.org; sta...@vger.kernel.org; David Laight > ; Arnd Bergmann > ;

RE: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread David Laight
From: Peter Zijlstra > Sent: 14 February 2019 11:08 > On Thu, Feb 14, 2019 at 10:44:49AM +, Alexey Brodkin wrote: > > > On Wed, Feb 13, 2019 at 03:23:36PM -0800, Vineet Gupta wrote: > > > > On 2/13/19 4:56 AM, Peter Zijlstra wrote: > > > > > > > > > > Personally I think u64 and company should

Re: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Peter Zijlstra
On Thu, Feb 14, 2019 at 12:05:47PM +, Alexey Brodkin wrote: > > > > So what happens if the data is then split across two cachelines; will a > > > > STD vs LDD still be single-copy-atomic? I don't _think_ we rely on that > > > > for > sizeof(unsigned long), with the obvious exception of

[PATCH v2 1/2] ARC: U-boot: check arguments paranoidly

2019-02-14 Thread Eugeniy Paltsev
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. NOTE: If U-boot args are invalid we skip them and try to use embedded

[PATCH v2 0/2] ARC: rework U-boot arguments handling

2019-02-14 Thread Eugeniy Paltsev
Reworking U-boot args handling and enable uboot support unconditionally. Changes v1->v2: * Drop magic number check [in this patch series] * Keep comment about cndline appending Changes RFC->v1: * Don't add new ABI contract between kernel and uboot * Eliminate CONFIG_ARC_UBOOT_SUPPORT Kconfig

[PATCH v2 2/2] ARC: enable uboot support unconditionally

2019-02-14 Thread Eugeniy Paltsev
After reworking U-boot args handling code and adding paranoid arguments check we can eliminate CONFIG_ARC_UBOOT_SUPPORT and enable uboot support unconditionally. For JTAG case we can assume that core registers will come up reset value of 0 or in worst case we rely on user passing '-on=clear_regs'

Re: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8

2019-02-14 Thread Vineet Gupta
On 2/14/19 12:50 AM, Alexey Brodkin wrote: > I suspect the slab allocator should be returning 8 byte aligned addresses > on all systems why ? As I understand it is still not fool proof against the expected alignment of inner members. There ought to be a better way

[PATCH AUTOSEL 4.20 33/77] ARC: show_regs: lockdep: avoid page allocator...

2019-02-14 Thread Sasha Levin
From: Vineet Gupta [ Upstream commit ab6c03676cb190156603cf4c5ecf97aa406c9c53 ] and use smaller/on-stack buffer instead The motivation for this change was lockdep splat like below. | potentially unexpected fatal signal 11. | BUG: sleeping function called from invalid context at

[PATCH AUTOSEL 4.20 32/77] ARC: fix __ffs return value to avoid build warnings

2019-02-14 Thread Sasha Levin
From: Eugeniy Paltsev [ Upstream commit 4e868f8419cb4cb558c5d428e7ab5629cef864c7 ] | CC mm/nobootmem.o |In file included from ./include/asm-generic/bug.h:18:0, | from ./arch/arc/include/asm/bug.h:32, | from ./include/linux/bug.h:5, | from

[PATCH AUTOSEL 4.19 26/65] ARC: show_regs: lockdep: avoid page allocator...

2019-02-14 Thread Sasha Levin
From: Vineet Gupta [ Upstream commit ab6c03676cb190156603cf4c5ecf97aa406c9c53 ] and use smaller/on-stack buffer instead The motivation for this change was lockdep splat like below. | potentially unexpected fatal signal 11. | BUG: sleeping function called from invalid context at

[PATCH AUTOSEL 4.19 25/65] ARC: fix __ffs return value to avoid build warnings

2019-02-14 Thread Sasha Levin
From: Eugeniy Paltsev [ Upstream commit 4e868f8419cb4cb558c5d428e7ab5629cef864c7 ] | CC mm/nobootmem.o |In file included from ./include/asm-generic/bug.h:18:0, | from ./arch/arc/include/asm/bug.h:32, | from ./include/linux/bug.h:5, | from

[PATCH AUTOSEL 4.14 15/40] ARC: fix __ffs return value to avoid build warnings

2019-02-14 Thread Sasha Levin
From: Eugeniy Paltsev [ Upstream commit 4e868f8419cb4cb558c5d428e7ab5629cef864c7 ] | CC mm/nobootmem.o |In file included from ./include/asm-generic/bug.h:18:0, | from ./arch/arc/include/asm/bug.h:32, | from ./include/linux/bug.h:5, | from

[PATCH AUTOSEL 4.9 10/27] ARC: fix __ffs return value to avoid build warnings

2019-02-14 Thread Sasha Levin
From: Eugeniy Paltsev [ Upstream commit 4e868f8419cb4cb558c5d428e7ab5629cef864c7 ] | CC mm/nobootmem.o |In file included from ./include/asm-generic/bug.h:18:0, | from ./arch/arc/include/asm/bug.h:32, | from ./include/linux/bug.h:5, | from

[PATCH AUTOSEL 4.4 09/20] ARC: fix __ffs return value to avoid build warnings

2019-02-14 Thread Sasha Levin
From: Eugeniy Paltsev [ Upstream commit 4e868f8419cb4cb558c5d428e7ab5629cef864c7 ] | CC mm/nobootmem.o |In file included from ./include/asm-generic/bug.h:18:0, | from ./arch/arc/include/asm/bug.h:32, | from ./include/linux/bug.h:5, | from