Commit 47da42b2 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

powerpc/mm/highmem: Switch to generic kmap atomic



No reason having the same code in every architecture

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201103095858.087635810@linutronix.de
parent 5f037ea3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -409,6 +409,7 @@ menu "Kernel options"
config HIGHMEM
	bool "High memory support"
	depends on PPC32
	select KMAP_LOCAL

source "kernel/Kconfig.hz"

+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <asm/page.h>
#ifdef CONFIG_HIGHMEM
#include <linux/threads.h>
#include <asm/kmap_types.h>
#include <asm/kmap_size.h>
#endif

#ifdef CONFIG_KASAN
@@ -55,7 +55,7 @@ enum fixed_addresses {
	FIX_EARLY_DEBUG_BASE = FIX_EARLY_DEBUG_TOP+(ALIGN(SZ_128K, PAGE_SIZE)/PAGE_SIZE)-1,
#ifdef CONFIG_HIGHMEM
	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
	FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
	FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1,
#endif
#ifdef CONFIG_PPC_8xx
	/* For IMMR we need an aligned 512K area */
+5 −2
Original line number Diff line number Diff line
@@ -24,12 +24,10 @@
#ifdef __KERNEL__

#include <linux/interrupt.h>
#include <asm/kmap_types.h>
#include <asm/cacheflush.h>
#include <asm/page.h>
#include <asm/fixmap.h>

extern pte_t *kmap_pte;
extern pte_t *pkmap_page_table;

/*
@@ -60,6 +58,11 @@ extern pte_t *pkmap_page_table;

#define flush_cache_kmaps()	flush_cache_all()

#define arch_kmap_local_post_map(vaddr, pteval)	\
	local_flush_tlb_page(NULL, vaddr)
#define arch_kmap_local_post_unmap(vaddr)	\
	local_flush_tlb_page(NULL, vaddr)

#endif /* __KERNEL__ */

#endif /* _ASM_HIGHMEM_H */
+0 −13
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _ASM_POWERPC_KMAP_TYPES_H
#define _ASM_POWERPC_KMAP_TYPES_H

#ifdef __KERNEL__

/*
 */

#define KM_TYPE_NR 16

#endif	/* __KERNEL__ */
#endif	/* _ASM_POWERPC_KMAP_TYPES_H */
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
obj-$(CONFIG_PPC_MM_SLICES)	+= slice.o
obj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
obj-$(CONFIG_HIGHMEM)		+= highmem.o
obj-$(CONFIG_PPC_COPRO_BASE)	+= copro_fault.o
obj-$(CONFIG_PPC_PTDUMP)	+= ptdump/
obj-$(CONFIG_KASAN)		+= kasan/
Loading