[PATCH 2/5] arch/kmap: Remove redundant arch specific kmaps

2020-04-25 Thread ira . weiny
From: Ira Weiny The kmap code for all the architectures is almost 100% identical. Lift the common code to the core. Use ARCH_HAS_KMAP to indicate if an arch needs a special kmap. This also has the benefit of changing kmap() on a number of architectures to be an inline call rather than an actua

[PATCH 3/5] arch/kunmap: Remove duplicate kunmap implementations

2020-04-25 Thread ira . weiny
From: Ira Weiny All architectures do exactly the same thing for kunmap(); remove all the duplicate definitions and lift the call to the core. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny --- arch/arc/include/asm/highmem.h| 9 - arch/arm/include/asm/highmem.h| 1

[PATCH 1/5] arch/kmap: Remove BUG_ON()

2020-04-25 Thread ira . weiny
From: Ira Weiny Replace the use of BUG_ON(in_interrupt()) in the kmap() and kunmap() in favor of might_sleep(). Besides the benefits of might_sleep(), this normalizes the implementations such that they can be made generic in subsequent patches. Reviewed-by: Dan Williams Signed-off-by: Ira Wein

[PATCH 5/5] arch/kunmap_atomic: Consolidate duplicate code

2020-04-25 Thread ira . weiny
From: Ira Weiny Every single architecture (including !CONFIG_HIGHMEM) calls... pagefault_enable(); preempt_enable(); ... before returning from __kunmap_atomic(). Lift this code into the kunmap_atomic() macro. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny --- arch/arc/m

[PATCH 0/5] Remove duplicated kmap code

2020-04-25 Thread ira . weiny
From: Ira Weiny The kmap infrastructure has been copied almost verbatim to every architecture. This series consolidates obvious duplicated code. (k[un]map_atmoic has some additional duplication between some of the architectures but the differences were such to not warrant further changes.) 0day

[PATCH 4/5] arch/kmap_atomic: Consolidate duplicate code

2020-04-25 Thread ira . weiny
From: Ira Weiny Every arch has the same check for a not HIGHMEM page. Define kmap_atomic_fast() to quickly return already mapped pages and reduce the code duplication by lifting this check to the core. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny --- arch/arc/mm/highmem.c| 7 ++

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

2020-04-25 Thread Mike Rapoport
On Fri, Apr 24, 2020 at 09:22:32AM +0200, David Hildenbrand wrote: > On 12.04.20 21:48, Mike Rapoport wrote: > > 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_