File tree Expand file tree Collapse file tree 6 files changed +26
-144
lines changed Expand file tree Collapse file tree 6 files changed +26
-144
lines changed Original file line number Diff line number Diff line change @@ -1498,6 +1498,7 @@ config HAVE_ARCH_PFN_VALID
1498
1498
config HIGHMEM
1499
1499
bool "High Memory Support"
1500
1500
depends on MMU
1501
+ select KMAP_LOCAL
1501
1502
help
1502
1503
The address space of ARM processors is only 4 Gigabytes large
1503
1504
and it has to accommodate user address space, kernel address
Original file line number Diff line number Diff line change 7
7
#define FIXADDR_TOP (FIXADDR_END - PAGE_SIZE)
8
8
9
9
#include <linux/pgtable.h>
10
- #include <asm/kmap_types .h>
10
+ #include <asm/kmap_size .h>
11
11
12
12
enum fixed_addresses {
13
13
FIX_EARLYCON_MEM_BASE ,
14
14
__end_of_permanent_fixed_addresses ,
15
15
16
16
FIX_KMAP_BEGIN = __end_of_permanent_fixed_addresses ,
17
- FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_TYPE_NR * NR_CPUS ) - 1 ,
17
+ FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS ) - 1 ,
18
18
19
19
/* Support writing RO kernel text via kprobes, jump labels, etc. */
20
20
FIX_TEXT_POKE0 ,
Original file line number Diff line number Diff line change 2
2
#ifndef _ASM_HIGHMEM_H
3
3
#define _ASM_HIGHMEM_H
4
4
5
- #include <asm/kmap_types .h>
5
+ #include <asm/fixmap .h>
6
6
7
7
#define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE)
8
8
#define LAST_PKMAP PTRS_PER_PTE
@@ -46,19 +46,32 @@ extern pte_t *pkmap_page_table;
46
46
47
47
#ifdef ARCH_NEEDS_KMAP_HIGH_GET
48
48
extern void * kmap_high_get (struct page * page );
49
- #else
49
+
50
+ static inline void * arch_kmap_local_high_get (struct page * page )
51
+ {
52
+ if (IS_ENABLED (CONFIG_DEBUG_HIGHMEM ) && !cache_is_vivt ())
53
+ return NULL ;
54
+ return kmap_high_get (page );
55
+ }
56
+ #define arch_kmap_local_high_get arch_kmap_local_high_get
57
+
58
+ #else /* ARCH_NEEDS_KMAP_HIGH_GET */
50
59
static inline void * kmap_high_get (struct page * page )
51
60
{
52
61
return NULL ;
53
62
}
54
- #endif
63
+ #endif /* !ARCH_NEEDS_KMAP_HIGH_GET */
55
64
56
- /*
57
- * The following functions are already defined by <linux/highmem.h>
58
- * when CONFIG_HIGHMEM is not set.
59
- */
60
- #ifdef CONFIG_HIGHMEM
61
- extern void * kmap_atomic_pfn (unsigned long pfn );
62
- #endif
65
+ #define arch_kmap_local_post_map (vaddr , pteval ) \
66
+ local_flush_tlb_kernel_page(vaddr)
67
+
68
+ #define arch_kmap_local_pre_unmap (vaddr ) \
69
+ do { \
70
+ if (cache_is_vivt()) \
71
+ __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); \
72
+ } while (0)
73
+
74
+ #define arch_kmap_local_post_unmap (vaddr ) \
75
+ local_flush_tlb_kernel_page(vaddr)
63
76
64
77
#endif
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ obj-$(CONFIG_MODULES) += proc-syms.o
19
19
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
20
20
21
21
obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
22
- obj-$(CONFIG_HIGHMEM) += highmem.o
23
22
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
24
23
obj-$(CONFIG_ARM_PV_FIXUP) += pv-fixup-asm.o
25
24
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments