Skip to content

Commit

Permalink
sparc/mm/highmem: Switch to generic kmap atomic
Browse files Browse the repository at this point in the history
No reason having the same code in every architecture

Signed-off-by: Thomas 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
  • Loading branch information
Thomas Gleixner committed Nov 6, 2020
1 parent 47da42b commit 3293efa
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 136 deletions.
1 change: 1 addition & 0 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ config MMU
config HIGHMEM
bool
default y if SPARC32
select KMAP_LOCAL

config ZONE_DMA
bool
Expand Down
8 changes: 5 additions & 3 deletions arch/sparc/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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
Expand All @@ -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 */
11 changes: 0 additions & 11 deletions arch/sparc/include/asm/kmap_types.h

This file was deleted.

4 changes: 2 additions & 2 deletions arch/sparc/include/asm/vaddrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
3 changes: 0 additions & 3 deletions arch/sparc/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
115 changes: 0 additions & 115 deletions arch/sparc/mm/highmem.c

This file was deleted.

2 changes: 0 additions & 2 deletions arch/sparc/mm/srmmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,6 @@ void __init srmmu_paging_init(void)

sparc_context_init(num_contexts);

kmap_init();

{
unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };

Expand Down

0 comments on commit 3293efa

Please sign in to comment.