File tree Expand file tree Collapse file tree 5 files changed +19
-57
lines changed Expand file tree Collapse file tree 5 files changed +19
-57
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ config HW_SUPPORT_UNALIGNMENT_ACCESS
157157config HIGHMEM
158158 bool "High Memory Support"
159159 depends on MMU && !CPU_CACHE_ALIASING
160+ select KMAP_LOCAL
160161 help
161162 The address space of Andes processors is only 4 Gigabytes large
162163 and it has to accommodate user address space, kernel address
Original file line number Diff line number Diff line change 66
77#ifdef CONFIG_HIGHMEM
88#include <linux/threads.h>
9- #include <asm/kmap_types .h>
9+ #include <asm/kmap_size .h>
1010#endif
1111
1212enum fixed_addresses {
1313 FIX_HOLE ,
1414 FIX_KMAP_RESERVED ,
1515 FIX_KMAP_BEGIN ,
1616#ifdef CONFIG_HIGHMEM
17- FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_TYPE_NR * NR_CPUS ),
17+ FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS ) - 1 ,
1818#endif
1919 FIX_EARLYCON_MEM_BASE ,
2020 __end_of_fixed_addresses
Original file line number Diff line number Diff line change 55#define _ASM_HIGHMEM_H
66
77#include <asm/proc-fns.h>
8- #include <asm/kmap_types.h>
98#include <asm/fixmap.h>
109
1110/*
@@ -45,11 +44,22 @@ extern pte_t *pkmap_page_table;
4544extern void kmap_init (void );
4645
4746/*
48- * The following functions are already defined by <linux/highmem.h>
49- * when CONFIG_HIGHMEM is not set.
47+ * FIXME: The below looks broken vs. a kmap_atomic() in task context which
48+ * is interupted and another kmap_atomic() happens in interrupt context.
49+ * But what do I know about nds32. -- tglx
5050 */
51- #ifdef CONFIG_HIGHMEM
52- extern void * kmap_atomic_pfn (unsigned long pfn );
53- #endif
51+ #define arch_kmap_local_post_map (vaddr , pteval ) \
52+ do { \
53+ __nds32__tlbop_inv(vaddr); \
54+ __nds32__mtsr_dsb(vaddr, NDS32_SR_TLB_VPN); \
55+ __nds32__tlbop_rwr(pteval); \
56+ __nds32__isb(); \
57+ } while (0)
58+
59+ #define arch_kmap_local_pre_unmap (vaddr ) \
60+ do { \
61+ __nds32__tlbop_inv(vaddr); \
62+ __nds32__isb(); \
63+ } while (0)
5464
5565#endif
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ obj-y := extable.o tlb.o fault.o init.o mmap.o \
33 mm-nds32.o cacheflush.o proc.o
44
55obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
6- obj-$(CONFIG_HIGHMEM) += highmem.o
76
87ifdef CONFIG_FUNCTION_TRACER
98CFLAGS_REMOVE_proc.o = $(CC_FLAGS_FTRACE )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments