Commit 3293efa9 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

sparc/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: "David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201103095858.197568209@linutronix.de
parent 47da42b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ config MMU
config HIGHMEM
	bool
	default y if SPARC32
	select KMAP_LOCAL

config ZONE_DMA
	bool
+5 −3
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@
#include <linux/interrupt.h>
#include <linux/pgtable.h>
#include <asm/vaddrs.h>
#include <asm/kmap_types.h>
#include <asm/pgtsrmmu.h>

/* declarations for highmem.c */
@@ -33,8 +32,6 @@ extern unsigned long highstart_pfn, highend_pfn;
#define kmap_prot __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE)
extern pte_t *pkmap_page_table;

void kmap_init(void) __init;

/*
 * Right now we initialize only a single pte table. It can be extended
 * easily, subsequent pte tables have to be allocated in one physical
@@ -53,6 +50,11 @@ void kmap_init(void) __init;

#define flush_cache_kmaps()	flush_cache_all()

/* FIXME: Use __flush_tlb_one(vaddr) instead of flush_cache_all() -- Anton */
#define arch_kmap_local_post_map(vaddr, pteval)	flush_cache_all()
#define arch_kmap_local_post_unmap(vaddr)	flush_cache_all()


#endif /* __KERNEL__ */

#endif /* _ASM_HIGHMEM_H */
+0 −11
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H

/* Dummy header just to define km_type.  None of this
 * is actually used on sparc.  -DaveM
 */

#include <asm-generic/kmap_types.h>

#endif
+2 −2
Original line number Diff line number Diff line
@@ -32,13 +32,13 @@
#define SRMMU_NOCACHE_ALCRATIO	64	/* 256 pages per 64MB of system RAM */

#ifndef __ASSEMBLY__
#include <asm/kmap_types.h>
#include <asm/kmap_size.h>

enum fixed_addresses {
	FIX_HOLE,
#ifdef CONFIG_HIGHMEM
	FIX_KMAP_BEGIN,
	FIX_KMAP_END = (KM_TYPE_NR * NR_CPUS),
	FIX_KMAP_END = (KM_MAX_IDX * NR_CPUS),
#endif
	__end_of_fixed_addresses
};
+0 −3
Original line number Diff line number Diff line
@@ -15,6 +15,3 @@ obj-$(CONFIG_SPARC32) += leon_mm.o

# Only used by sparc64
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o

# Only used by sparc32
obj-$(CONFIG_HIGHMEM)   += highmem.o
Loading