| .. | .. |
|---|
| 2 | 2 | #ifndef _ASM_HIGHMEM_H |
|---|
| 3 | 3 | #define _ASM_HIGHMEM_H |
|---|
| 4 | 4 | |
|---|
| 5 | | -#include <asm/kmap_size.h> |
|---|
| 6 | | -#include <asm/fixmap.h> |
|---|
| 5 | +#include <asm/kmap_types.h> |
|---|
| 7 | 6 | |
|---|
| 8 | 7 | #define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE) |
|---|
| 9 | 8 | #define LAST_PKMAP PTRS_PER_PTE |
|---|
| .. | .. |
|---|
| 47 | 46 | |
|---|
| 48 | 47 | #ifdef ARCH_NEEDS_KMAP_HIGH_GET |
|---|
| 49 | 48 | 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 |
|---|
| 60 | 50 | static inline void *kmap_high_get(struct page *page) |
|---|
| 61 | 51 | { |
|---|
| 62 | 52 | return NULL; |
|---|
| 63 | 53 | } |
|---|
| 64 | | -#endif /* !ARCH_NEEDS_KMAP_HIGH_GET */ |
|---|
| 54 | +#endif |
|---|
| 65 | 55 | |
|---|
| 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 |
|---|
| 77 | 63 | |
|---|
| 78 | 64 | #endif |
|---|