From: Ira Weiny
Move the kmap() build bug to kmap_init() to facilitate patches to lift
kmap() to the core.
Reviewed-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
Changes from V1:
combine code onto 1 line.
---
arch/xtensa/include/asm/highmem.h | 5 -
arch/xtensa/mm/highmem.c
From: Ira Weiny
The kmap infrastructure has been copied almost verbatim to every architecture.
This series consolidates obvious duplicated code by defining core functions
which call into the architectures only when needed.
Some of the k[un]map_atomic() implementations have some similarities but
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
Reviewed-by: Christoph
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_FLUSH_TLB to
indicate if an arch defines kmap_flush_tlb() and call if if needed.
This also has the benefit of changing kmap() on a number of
architectures to be
From: Ira Weiny
Every arch has the same code to ensure atomic operations and a check for
!HIGHMEM page.
Remove the duplicate code by defining a core kmap_atomic() which only
calls the arch specific kmap_atomic_high() when the page is high memory.
Reviewed-by: Christoph Hellwig
Signed-off-by: I
From: Ira Weiny
All architectures do exactly the same thing for kunmap(); remove all the
duplicate definitions and lift the call to the core.
This also has the benefit of changing kmap_unmap() on a number of
architectures to be an inline call rather than an actual function.
Reviewed-by: Christo
From: Ira Weiny
kmap_atomic_prot() is now exported by all architectures. Use this
function rather than open coding a driver specific kmap_atomic.
Acked-by: Daniel Vetter
Reviewed-by: Christian König
Reviewed-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
drivers/gpu/drm/ttm/ttm_bo_util
From: Ira Weiny
To support kmap_atomic_prot(), all architectures need to support
protections passed to their kmap_atomic_high() function. Pass
protections into kmap_atomic_high() and change the name to
kmap_atomic_high_prot() to match.
Then define kmap_atomic_prot() as a core function which cal
From: Ira Weiny
We want to support kmap_atomic_prot() on all architectures and it makes
sense to define kmap_atomic() to use the default kmap_prot.
So we ensure all arch's have a globally available kmap_prot either as a
define or exported symbol.
Reviewed-by: Christoph Hellwig
Signed-off-by: I
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.
While we are at it rename __kunmap_atomic() to kunmap_atomic_high()
From: Ira Weiny
parisc reimplements the kmap calls except to flush it's dcache. This is
arguably an abuse of kmap but regardless it is messy and confusing.
Remove the duplicate code and have parisc define
ARCH_HAS_FLUSH_ON_KUNMAP for a kunmap_flush_on_unmap() architecture
specific call to flush
From: Ira Weiny
linux/highmem.h has not been needed for the pte_offset_map =>
kmap_atomic use in sparc for some time (~2002)
Remove this include.
Suggested-by: Al Viro
Signed-off-by: Ira Weiny
---
Changes from V2:
New Patch for this series
---
arch/sparc/mm/io-unit.c | 1 -
arch/spa
From: Ira Weiny
To support kmap_atomic_prot() on all architectures each arch must
support protections passed in to them.
Change csky, mips, nds32 and xtensa to use their global constant
kmap_prot rather than a hard coded value which was equal.
Reviewed-by: Christoph Hellwig
Signed-off-by: Ira
From: Ira Weiny
During this kmap() conversion series we must maintain bisect-ability.
To do this, kmap_atomic_prot() in x86, powerpc, and microblaze need to
remain functional.
Create a temporary inline version of kmap_atomic_prot within these
architectures so we can rework their kmap_atomic() ca
From: Ira Weiny
kmap_atomic_to_page() has no callers and is only defined on 1 arch and
declared on another. Remove it.
Suggested-by: Al Viro
Signed-off-by: Ira Weiny
---
Changes from V2:
New Patch for this series
---
arch/csky/include/asm/highmem.h | 1 -
arch/csky/mm/highmem.c
From: Ira Weiny
Most architectures define kmap_prot to be PAGE_KERNEL.
Let sparc and xtensa define there own and define PAGE_KERNEL as the
default if not overridden.
Suggested-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
Changes from V2:
New Patch for this series
---
arch/arc/
On Thu, 7 May 2020 08:00:01 -0700 ira.we...@intel.com wrote:
> parisc reimplements the kmap calls except to flush it's dcache. This is
> arguably an abuse of kmap but regardless it is messy and confusing.
>
> Remove the duplicate code and have parisc define
> ARCH_HAS_FLUSH_ON_KUNMAP for a kunm
On Thu, 7 May 2020 08:00:03 -0700 ira.we...@intel.com wrote:
> From: Ira Weiny
>
> Most architectures define kmap_prot to be PAGE_KERNEL.
>
> Let sparc and xtensa define there own and define PAGE_KERNEL as the
> default if not overridden.
>
checkpatch considered useful ;)
From: Andrew Mort
On Thu, May 07, 2020 at 01:52:58PM -0700, Andrew Morton wrote:
> On Thu, 7 May 2020 08:00:01 -0700 ira.we...@intel.com wrote:
>
> > parisc reimplements the kmap calls except to flush it's dcache. This is
> > arguably an abuse of kmap but regardless it is messy and confusing.
> >
> > Remove the
On Thu, May 07, 2020 at 01:53:07PM -0700, Andrew Morton wrote:
> On Thu, 7 May 2020 08:00:03 -0700 ira.we...@intel.com wrote:
>
> > From: Ira Weiny
> >
> > Most architectures define kmap_prot to be PAGE_KERNEL.
> >
> > Let sparc and xtensa define there own and define PAGE_KERNEL as the
> > def
From: Ira Weiny
Most architectures define kmap_prot to be PAGE_KERNEL.
Let sparc and xtensa define there own and define PAGE_KERNEL as the
default if not overridden.
Suggested-by: Christoph Hellwig
Signed-off-by: Ira Weiny
---
Changes from V3:
Fix semicolon in macro
Changes from V2:
21 matches
Mail list logo