Re: [PATCH] ARC: HSDK: improve reset driver

2018-09-14 Thread Philipp Zabel
Hi Eugeniy, On Mon, 2018-08-27 at 17:38 +0300, Eugeniy Paltsev wrote: > As for today HSDK reset driver implements only > .reset() callback. > > In case of driver which implements one of standard > reset controller usage pattern > (call *_deassert() in probe(), call *_assert() in remove()) > that

[PATCH] ARC: fix spelling mistake "entires" -> "entries"

2018-09-14 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in Kconfig Signed-off-by: Colin Ian King --- arch/arc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index b4441b0764d7..a045f3086047 100644 --- a/arch/arc/Kconfig +++ b/arch/a

[PATCH 00/30] mm: remove bootmem allocator

2018-09-14 Thread Mike Rapoport
Hi, These patches switch early memory management to use memblock directly without any bootmem compatibility wrappers. As the result both bootmem and nobootmem are removed. The patchset survived allyesconfig builds on arm, arm64, i386, mips, nds32, parisc, powerpc, riscv, s390 and x86 and most of

[PATCH 07/30] memblock: remove _virt from APIs returning virtual address

2018-09-14 Thread Mike Rapoport
The conversion is done using sed -i 's@memblock_virt_alloc@memblock_alloc@g' \ $(git grep -l memblock_virt_alloc) Signed-off-by: Mike Rapoport --- arch/arm/kernel/setup.c | 4 ++-- arch/arm/mach-omap2/omap_hwmod.c | 6 ++--- arch/arm64/mm/kasan_init.c

[PATCH 09/30] memblock: replace alloc_bootmem_low with memblock_alloc_low

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/x86/kernel/tce_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/tce_64.c b/arch/x86/kernel/tce_64.c ind

[PATCH 08/30] memblock: replace alloc_bootmem_align with memblock_alloc

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index d6d74ef..5de761

[PATCH 12/30] memblock: replace alloc_bootmem_low with memblock_alloc_low

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_low(size) allocates low memory with default alignement and can be replcaed by memblock_alloc_low(size, 0) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/arm64/kernel/setup.c | 2 +- arch/unicore32/kernel/setup.c | 2 +- 2 files changed, 2 insertions(+), 2 del

[PATCH 14/30] memblock: add align parameter to memblock_alloc_node()

2018-09-14 Thread Mike Rapoport
With the align parameter memblock_alloc_node() can be used as drop in replacement for alloc_bootmem_pages_node() and __alloc_bootmem_node(), which is done in the following patches. Signed-off-by: Mike Rapoport --- include/linux/bootmem.h | 4 ++-- mm/sparse.c | 2 +- 2 files changed,

[PATCH 16/30] memblock: replace __alloc_bootmem_node with appropriate memblock_ API

2018-09-14 Thread Mike Rapoport
Use memblock_alloc_try_nid whenever goal (i.e. minimal address is specified) and memblock_alloc_node otherwise. Signed-off-by: Mike Rapoport --- arch/ia64/mm/discontig.c | 6 -- arch/powerpc/kernel/setup_64.c | 6 -- arch/sparc/kernel/setup_64.c | 10 -- arch/sparc/kern

[PATCH 13/30] memblock: replace __alloc_bootmem_nopanic with memblock_alloc_from_nopanic

2018-09-14 Thread Mike Rapoport
When __alloc_bootmem_nopanic() is used with explicit lower limit for the allocation it attempts to allocate memory at or above that limit and falls back to allocation with no limit set. The memblock_alloc_from_nopanic() does exactly the same thing and can be used as a replacement for __alloc_bootm

[PATCH 15/30] memblock: replace alloc_bootmem_pages_node with memblock_alloc_node

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/ia64/mm/init.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 3b85

[PATCH 11/30] memblock: replace alloc_bootmem_pages_nopanic with memblock_alloc_nopanic

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_pages_nopanic(size) is a shortcut for __alloc_bootmem_nopanic(size, PAGE_SIZE, BOOTMEM_LOW_LIMIT) which allocates PAGE_SIZE aligned memory. Since BOOTMEM_LOW_LIMIT is hardwired to 0 there is no restrictions on where the allocated memory should reside. The memblock_alloc_nopanic(s

[PATCH 18/30] memblock: replace alloc_bootmem_low_pages with memblock_alloc_low

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_low_pages() function allocates PAGE_SIZE aligned regions from low memory. memblock_alloc_low() with alignment set to PAGE_SIZE does exactly the same thing. The conversion is done using the following semantic patch: @@ expression e; @@ - alloc_bootmem_low_pages(e) + memblock_allo

[PATCH 17/30] memblock: replace alloc_bootmem_node with memblock_alloc_node

2018-09-14 Thread Mike Rapoport
Both functions attempt to allocate memory with specified alignment from a particular node. If the allocation from that node fails, they both fall back to allocating from any node in the system. Usage of native memblock API eliminates the nobootmem translation layer. Signed-off-by: Mike Rapoport

[PATCH 20/30] memblock: replace __alloc_bootmem with memblock_alloc_from

2018-09-14 Thread Mike Rapoport
The functions are equivalent, just the later does not require nobootmem translation layer. The conversion is done using the following semantic patch: @@ expression size, align, goal; @@ - __alloc_bootmem(size, align, goal) + memblock_alloc_from(size, align, goal) Signed-off-by: Mike Rapoport Ac

[PATCH 22/30] mm: nobootmem: remove bootmem allocation APIs

2018-09-14 Thread Mike Rapoport
The bootmem compatibility APIs are not used and can be removed. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- include/linux/bootmem.h | 47 -- mm/nobootmem.c | 224 2 files changed, 271 deletions(-) diff --git a/inclu

[PATCH 21/30] memblock: replace alloc_bootmem with memblock_alloc

2018-09-14 Thread Mike Rapoport
The alloc_bootmem(size) is a shortcut for allocation of SMP_CACHE_BYTES aligned memory. When the align parameter of memblock_alloc() is 0, the alignment is implicitly set to SMP_CACHE_BYTES and thus alloc_bootmem(size) and memblock_alloc(size, 0) are equivalent. The conversion is done using the fo

[PATCH 23/30] memblock: replace free_bootmem{_node} with memblock_free

2018-09-14 Thread Mike Rapoport
The free_bootmem and free_bootmem_node are merely wrappers for memblock_free. Replace their usage with a call to memblock_free using the following semantic patch: @@ expression e1, e2, e3; @@ ( - free_bootmem(e1, e2) + memblock_free(e1, e2) | - free_bootmem_node(e1, e2, e3) + memblock_free(e2, e3)

[PATCH 27/30] mm: remove nobootmem

2018-09-14 Thread Mike Rapoport
Move a few remaining functions from nobootmem.c to memblock.c and remove nobootmem Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- mm/Makefile| 1 - mm/memblock.c | 104 ++ mm/nobootmem.c | 128 --

[PATCH 28/30] memblock: replace BOOTMEM_ALLOC_* with MEMBLOCK variants

2018-09-14 Thread Mike Rapoport
Drop BOOTMEM_ALLOC_ACCESSIBLE and BOOTMEM_ALLOC_ANYWHERE in favor of identical MEMBLOCK definitions. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/ia64/mm/discontig.c | 2 +- arch/powerpc/kernel/setup_64.c | 2 +- arch/sparc/kernel/smp_64.c | 2 +- arch/x86/kernel/setup

[PATCH 29/30] mm: remove include/linux/bootmem.h

2018-09-14 Thread Mike Rapoport
Move remaining definitions and declarations from include/linux/bootmem.h into include/linux/memblock.h and remove the redundant header. The includes were replaced with the semantic patch below and then semi-automated removal of duplicated '#include @@ @@ - #include + #include Signed-off-by: M

[PATCH 02/30] mm: remove CONFIG_NO_BOOTMEM

2018-09-14 Thread Mike Rapoport
All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any kernel configuration and therefore it can be removed. Signed-off-by: Mike Rapoport --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1 - arch/arm/Kconfig| 1 - arch/arm64/Kconfig | 1 - arch/c6x

[PATCH 26/30] memblock: rename __free_pages_bootmem to memblock_free_pages

2018-09-14 Thread Mike Rapoport
The conversion is done using sed -i 's@__free_pages_bootmem@memblock_free_pages@' \ $(git grep -l __free_pages_bootmem) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- mm/internal.h | 2 +- mm/memblock.c | 2 +- mm/nobootmem.c | 2 +- mm/page_alloc.c | 2 +- 4 files changed, 4

[PATCH 10/30] memblock: replace __alloc_bootmem_node_nopanic with memblock_alloc_try_nid_nopanic

2018-09-14 Thread Mike Rapoport
The __alloc_bootmem_node_nopanic() attempts to allocate memory for a specified node. If the allocation fails it then retries to allocate memory from any node. Upon success, the allocated memory is set to 0. The memblock_alloc_try_nid_nopanic() does exactly the same thing and can be used instead.

[PATCH 30/30] docs/boot-time-mm: remove bootmem documentation

2018-09-14 Thread Mike Rapoport
Signed-off-by: Mike Rapoport --- Documentation/core-api/boot-time-mm.rst | 71 + 1 file changed, 10 insertions(+), 61 deletions(-) diff --git a/Documentation/core-api/boot-time-mm.rst b/Documentation/core-api/boot-time-mm.rst index 03cb164..e5ec9f1 100644 --- a/D

[PATCH 06/30] memblock: rename memblock_alloc{_nid, _try_nid} to memblock_phys_alloc*

2018-09-14 Thread Mike Rapoport
Make it explicit that the caller gets a physical address rather than a virtual one. This will also allow using meblock_alloc prefix for memblock allocations returning virtual address, which is done in the following patches. The conversion is done using the following semantic patch: @@ expression

[PATCH 25/30] memblock: rename free_all_bootmem to memblock_free_all

2018-09-14 Thread Mike Rapoport
The conversion is done using sed -i 's@free_all_bootmem@memblock_free_all@' \ $(git grep -l free_all_bootmem) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/alpha/mm/init.c | 2 +- arch/arc/mm/init.c | 2 +- arch/arm/mm/init.c

[PATCH 24/30] memblock: replace free_bootmem_late with memblock_free_late

2018-09-14 Thread Mike Rapoport
The free_bootmem_late and memblock_free_late do exactly the same thing: they iterate over a range and give pages to the page allocator. Replace calls to free_bootmem_late with calls to memblock_free_late and remove the bootmem variant. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- ar

[PATCH 05/30] mm: nobootmem: remove dead code

2018-09-14 Thread Mike Rapoport
Several bootmem functions and macros are not used. Remove them. Signed-off-by: Mike Rapoport --- include/linux/bootmem.h | 26 -- mm/nobootmem.c | 35 --- 2 files changed, 61 deletions(-) diff --git a/include/linux/bootmem.h b/inc

[PATCH 04/30] mm: remove bootmem allocator implementation.

2018-09-14 Thread Mike Rapoport
All architectures have been converted to use MEMBLOCK + NO_BOOTMEM. The bootmem allocator implementation can be removed. Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- include/linux/bootmem.h | 16 - mm/bootmem.c| 811 2 fil

[PATCH 19/30] memblock: replace alloc_bootmem_pages with memblock_alloc

2018-09-14 Thread Mike Rapoport
The alloc_bootmem_pages() function allocates PAGE_SIZE aligned memory. memblock_alloc() with alignment set to PAGE_SIZE does exactly the same thing. The conversion is done using the following semantic patch: @@ expression e; @@ - alloc_bootmem_pages(e) + memblock_alloc(e, PAGE_SIZE) Signed-off-b

[PATCH 03/30] mm: remove CONFIG_HAVE_MEMBLOCK

2018-09-14 Thread Mike Rapoport
All architecures use memblock for early memory management. There is no need for the CONFIG_HAVE_MEMBLOCK configuration option. Signed-off-by: Mike Rapoport --- arch/alpha/Kconfig | 1 - arch/arc/Kconfig| 1 - arch/arm/Kconfig| 1 - a

[PATCH 01/30] mips: switch to NO_BOOTMEM

2018-09-14 Thread Mike Rapoport
MIPS already has memblock support and all the memory is already registered with it. This patch replaces bootmem memory reservations with memblock ones and removes the bootmem initialization. Since memblock allocates memory in top-down mode, we ensure that memblock limit is max_low_pfn to prevent

Re: [PATCH] drm/etnaviv: add DMA configuration for etnaviv platform device

2018-09-14 Thread Eugeniy Paltsev
Hi Lucas, On Fri, 2018-09-14 at 11:24 +0200, Lucas Stach wrote: > The etnaviv device is a virtual device backing the DRM device, which may > drive multiple hardware GPU core devies. As most of the dma-mapping handling > is done through the virtual device, we need to make sure that a proper DMA > s

Re: [PATCH] ARC: fix spelling mistake "entires" -> "entries"

2018-09-14 Thread Vineet Gupta
On 09/14/2018 04:27 AM, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in Kconfig > > Signed-off-by: Colin Ian King Applied ! Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.i