Re: [PATCH 01/12] mfd/sm501: depend on HAS_DMA

2019-02-12 Thread Lee Jones
On Mon, 11 Feb 2019, Christoph Hellwig wrote: > Currently the sm501 mfd driver can be compiled without any dependencies, > but through the use of dma_declare_coherent it really depends on > having DMA and iomem support. Normally we don't explicitly require DMA > support as we have stubs for it if

Re: [PATCH 06/12] dma-mapping: improve selection of dma_declare_coherent availability

2019-02-12 Thread Lee Jones
On Mon, 11 Feb 2019, Christoph Hellwig wrote: > This API is primarily used through DT entries, but two architectures > and two drivers call it directly. So instead of selecting the config > symbol for random architectures pull it in implicitly for the actual > users. Also rename the Kconfig opti

Re: Semantics of symbol address in perf report -v

2019-02-12 Thread Vineet Gupta
On 1/23/19 11:55 AM, Vineet Gupta wrote: > 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

Re: [PATCH 06/12] dma-mapping: improve selection of dma_declare_coherent availability

2019-02-12 Thread Rob Herring
On Mon, Feb 11, 2019 at 7:37 AM Christoph Hellwig wrote: > > This API is primarily used through DT entries, but two architectures > and two drivers call it directly. So instead of selecting the config > symbol for random architectures pull it in implicitly for the actual > users. Also rename the

Re: [PATCH 03/12] of: mark early_init_dt_alloc_reserved_memory_arch static

2019-02-12 Thread Rob Herring
On Mon, Feb 11, 2019 at 7:36 AM Christoph Hellwig wrote: > > This function is only used in of_reserved_mem.c, and never overridden > despite the __weak marker. > > Signed-off-by: Christoph Hellwig > --- > drivers/of/of_reserved_mem.c| 2 +- > include/linux/of_reserved_mem.h | 7 --- > 2

Re: [PATCH 04/12] of: select OF_RESERVED_MEM automatically

2019-02-12 Thread Rob Herring
On Mon, Feb 11, 2019 at 7:37 AM Christoph Hellwig wrote: > > The OF_RESERVED_MEM can be used if we have either CMA or the generic > declare coherent code built and we support the early flattened DT. > > So don't bother making it a user visible options that is selected > by most configs that fit th

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

2019-02-12 Thread Vineet Gupta
+CC some folks interested in alignment stuff in the past. On 2/12/19 9:30 AM, David Laight wrote: > From: Vineet Gupta >> Sent: 12 February 2019 17:17 >> >> On 2/8/19 2:55 AM, Alexey Brodkin wrote: >>> By default ARCH_SLAB_MINALIGN is defined in "include/linux/slab.h" as >>> "__alignof__(unsigned

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

2019-02-12 Thread Vineet Gupta
On 2/12/19 9:25 AM, Eugeniy Paltsev wrote: >> This is technically changing the ABI - I think we don't need to enforce this >> - >> keep ignoring this > I think it's better to add this check: > * This check doesn't break backward compatibility. ARC U-boot pass zero to r1 >from the beginnings,

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

2019-02-12 Thread David Laight
From: Vineet Gupta > Sent: 12 February 2019 17:17 > > On 2/8/19 2:55 AM, Alexey Brodkin wrote: > > By default ARCH_SLAB_MINALIGN is defined in "include/linux/slab.h" as > > "__alignof__(unsigned long long)" which looks fine but not for ARC. > > Just for the record, the issue happens because a LL

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

2019-02-12 Thread Eugeniy Paltsev
On Tue, 2019-02-12 at 16:45 +, Vineet Gupta wrote: > On 2/12/19 7:39 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. > > * check that magic

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

2019-02-12 Thread Vineet Gupta
On 2/8/19 2:55 AM, Alexey Brodkin wrote: > By default ARCH_SLAB_MINALIGN is defined in "include/linux/slab.h" as > "__alignof__(unsigned long long)" which looks fine but not for ARC. Just for the record, the issue happens because a LLOCKD (exclusive 64-bit load) was trying to use a 32-bit aligned

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

2019-02-12 Thread Vineet Gupta
On 2/12/19 7:39 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. > * check that magic number is correct. > * don't check uboot_tag if kernel build with

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

2019-02-12 Thread Vineet Gupta
On 2/12/19 8:39 AM, LABBE Corentin wrote: >> While I'm at it refactor U-boot arguments handling code. >> > Hello > > I have tried to test this serie, but this patch does not apply anymore on > current next tree. > It conflicts with "ARC: boot: robustify u-boot arg referencing". I was carrying tha

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

2019-02-12 Thread LABBE Corentin
On Tue, Feb 12, 2019 at 06:39:31PM +0300, 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. > * check that magic number is correct. > * don't check uboot_tag

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

2019-02-12 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'

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

2019-02-12 Thread Eugeniy Paltsev
Reworking U-boot args handling and enable uboot support unconditionally. Changes RFC->v1: * Don't add new ABI contract between kernel and uboot * Eliminate CONFIG_ARC_UBOOT_SUPPORT Kconfig option and enable uboot support unconditionally * Skip invalid U-boot args instead of panic * Check ex

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

2019-02-12 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. * check that magic number is correct. * don't check uboot_tag if kernel build with no ARC_UBOOT_SUPPORT. NOTE: If U-boot args are invalid