RE: [PATCH] ARC: guard dsp early init against non ARCv2

2020-04-29 Thread Jose Abreu
From: Eugeniy Paltsev Date: Apr/28/2020, 19:50:24 (UTC+00:00) > As of today we guard early DSP init code with > ARC_AUX_DSP_BUILD (0x7A) BCR check to verify that we have > CPU with DSP configured. However that's not enough as in > ARCv1 CPU the same BCR (0x7A) is used for checking MUL/MAC >

[PATCH v2.5 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Mike Rapoport
On Wed, Apr 29, 2020 at 03:11:22PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions > rather that check each PFN") made early_pfn_in_nid() obsolete and since > CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub

[PATCH v1] clocksource: arc_timer: remove duplicate error message

2020-04-29 Thread Dejin Zheng
it will print an error message by itself when arc_get_timer_clk() goes wrong. so remove the duplicate error message. Signed-off-by: Dejin Zheng --- drivers/clocksource/arc_timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clocksource/arc_timer.c

Re: [PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Mike Rapoport
On Wed, Apr 29, 2020 at 07:17:06AM -0700, Christoph Hellwig wrote: > On Wed, Apr 29, 2020 at 03:11:22PM +0300, Mike Rapoport wrote: > > From: Mike Rapoport > > > > The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions > > rather that check each PFN") made early_pfn_in_nid()

Re: [PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Christoph Hellwig
On Wed, Apr 29, 2020 at 03:11:22PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions > rather that check each PFN") made early_pfn_in_nid() obsolete and since > CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub

[arc:topic-zol-remove 11/23] arch/arc/kernel/head.S:99: Error: opcode 'std' not supported for target arc700

2020-04-29 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git topic-zol-remove head: bc44856c00c323436192ecb07490d6dec95f9cc3 commit: 8edf09c34e4cc21a34c2add480fa86d7dc498ed6 [11/23] ARC: head: elide ZOL, use double load/store config: arc-randconfig-a001-20200429 (attached as .config

Re: [PATCH] ARC: guard dsp early init against non ARCv2

2020-04-29 Thread Eugeniy Paltsev
Hi Vineet, > From: Vineet Gupta > Sent: Tuesday, April 28, 2020 22:46 > To: Eugeniy Paltsev; linux-snps-arc@lists.infradead.org > Cc: Alexey Brodkin; linux-ker...@vger.kernel.org > Subject: Re: [PATCH] ARC: guard dsp early init against non ARCv2 > > On 4/28/20 11:50 AM, Eugeniy Paltsev wrote:

Re: [PATCH] ARC: guard dsp early init against non ARCv2

2020-04-29 Thread Vineet Gupta
On 4/29/20 10:12 AM, Eugeniy Paltsev wrote: > Hi Vineet, > >> From: Vineet Gupta >> Sent: Tuesday, April 28, 2020 22:46 >> To: Eugeniy Paltsev; linux-snps-arc@lists.infradead.org >> Cc: Alexey Brodkin; linux-ker...@vger.kernel.org >> Subject: Re: [PATCH] ARC: guard dsp early init against non

[PATCH v2 02/20] mm: make early_pfn_to_nid() and related defintions close to each other

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The early_pfn_to_nid() and it's helper __early_pfn_to_nid() are spread around include/linux/mm.h, include/linux/mmzone.h and mm/page_alloc.c. Drop unused stub for __early_pfn_to_nid() and move its actual generic implementation close to its users. Signed-off-by: Mike

[PATCH v2 03/20] mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The CONFIG_HAVE_MEMBLOCK_NODE_MAP is used to differentiate initialization of nodes and zones structures between the systems that have region to node mapping in memblock and those that don't. Currently all the NUMA architectures enable this option and for the non-NUMA systems

[PATCH v2 01/20] mm: memblock: replace dereferences of memblock_region.nid with API calls

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport There are several places in the code that directly dereference memblock_region.nid despite this field being defined only when CONFIG_HAVE_MEMBLOCK_NODE_MAP=y. Replace these with calls to memblock_get_region_nid() to improve code robustness and to avoid possible breakage when

[PATCH v2 04/20] mm: free_area_init: use maximal zone PFNs rather than zone sizes

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport Currently, architectures that use free_area_init() to initialize memory map and node and zone structures need to calculate zone and hole sizes. We can use free_area_init_nodes() instead and let it detect the zone boundaries while the architectures will only have to supply the

[PATCH v2 00/20] mm: rework free_area_init*() funcitons

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport Hi, After the discussion [1] about removal of CONFIG_NODES_SPAN_OTHER_NODES and CONFIG_HAVE_MEMBLOCK_NODE_MAP options, I took it a bit further and updated the node/zone initialization. Since all architectures have memblock, it is possible to use only the newer version of

[PATCH v2 07/20] arm: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 08/20] arm64: simplify detection of memory zone boundaries for UMA configs

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 09/20] csky: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 05/20] mm: use free_area_init() instead of free_area_init_nodes()

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() has effectively became a wrapper for free_area_init_nodes() and there is no point of keeping it. Still free_area_init() name is shorter and more general as it does not imply necessity to initialize multiple nodes. Rename free_area_init_nodes() to

[PATCH v2 06/20] alpha: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 11/20] parisc: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 10/20] m68k: mm: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The commit f47ac088c406 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") made early_pfn_in_nid() obsolete and since CONFIG_NODES_SPAN_OTHER_NODES is only used to pick a stub or a real implementation of early_pfn_in_nid() it is also not needed

[PATCH v2 12/20] sparc32: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport Some architectures (e.g. ARC) have the ZONE_HIGHMEM zone below the ZONE_NORMAL. Allowing free_area_init() parse max_zone_pfn array even it is sorted in descending order allows using free_area_init() on such architectures. Add top -> down traversal of max_zone_pfn array in

[PATCH v2 13/20] unicore32: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 15/20] mm: memmap_init: iterate over memblock regions rather that check each PFN

2020-04-29 Thread Mike Rapoport
From: Baoquan He When called during boot the memmap_init_zone() function checks if each PFN is valid and actually belongs to the node being initialized using early_pfn_valid() and early_pfn_in_nid(). Each such check may cost up to O(log(n)) where n is the number of memory banks, so for large

[PATCH v2 14/20] xtensa: simplify detection of memory zone boundaries

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init() function only requires the definition of maximal PFN for each of the supported zone rater than calculation of actual zone sizes and the sizes of the holes between the zones. After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP the free_area_init() is available

[PATCH v2 20/20] docs/vm: update memory-models documentation

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport to reflect the updates to free_area_init() family of functions. Signed-off-by: Mike Rapoport --- Documentation/vm/memory-model.rst | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/vm/memory-model.rst

[PATCH v2 19/20] mm: simplify find_min_pfn_with_active_regions()

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The find_min_pfn_with_active_regions() calls find_min_pfn_for_node() with nid parameter set to MAX_NUMNODES. This makes the find_min_pfn_for_node() traverse all memblock memory regions although the first PFN in the system can be easily found with memblock_start_of_DRAM().

[PATCH v2 18/20] mm: clean up free_area_init_node() and its helpers

2020-04-29 Thread Mike Rapoport
From: Mike Rapoport The free_area_init_node() now always uses memblock info and the zone PFN limits so it does not need the backwards compatibility functions to calculate the zone spanned and absent pages. The removal of the compat_ versions of zone_{abscent,spanned}_pages_in_node() in turn,

RE: [PATCH] ARC: guard dsp early init against non ARCv2

2020-04-29 Thread Angelo Ribeiro
Hi Eugeniy, Tested okay on a ARCv1. Thanks Angelo Tested-by: Angelo Ribeiro From: Jose Abreu Date: Wed, Apr 29, 2020 at 07:19:55 > From: Eugeniy Paltsev > Date: Apr/28/2020, 19:50:24 (UTC+00:00) > > > As of today we guard early DSP init code with > > ARC_AUX_DSP_BUILD (0x7A) BCR check to