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
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
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
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
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
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 ++
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_