hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/include/asm/highmem.h
....@@ -2,8 +2,7 @@
22 #ifndef _ASM_HIGHMEM_H
33 #define _ASM_HIGHMEM_H
44
5
-#include <asm/kmap_size.h>
6
-#include <asm/fixmap.h>
5
+#include <asm/kmap_types.h>
76
87 #define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE)
98 #define LAST_PKMAP PTRS_PER_PTE
....@@ -47,32 +46,19 @@
4746
4847 #ifdef ARCH_NEEDS_KMAP_HIGH_GET
4948 extern void *kmap_high_get(struct page *page);
50
-
51
-static inline void *arch_kmap_local_high_get(struct page *page)
52
-{
53
- if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM) && !cache_is_vivt())
54
- return NULL;
55
- return kmap_high_get(page);
56
-}
57
-#define arch_kmap_local_high_get arch_kmap_local_high_get
58
-
59
-#else /* ARCH_NEEDS_KMAP_HIGH_GET */
49
+#else
6050 static inline void *kmap_high_get(struct page *page)
6151 {
6252 return NULL;
6353 }
64
-#endif /* !ARCH_NEEDS_KMAP_HIGH_GET */
54
+#endif
6555
66
-#define arch_kmap_local_post_map(vaddr, pteval) \
67
- local_flush_tlb_kernel_page(vaddr)
68
-
69
-#define arch_kmap_local_pre_unmap(vaddr) \
70
-do { \
71
- if (cache_is_vivt()) \
72
- __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE); \
73
-} while (0)
74
-
75
-#define arch_kmap_local_post_unmap(vaddr) \
76
- local_flush_tlb_kernel_page(vaddr)
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
7763
7864 #endif