Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / csky / include / asm / highmem.h
blob1f4ed3f4c0d9bcaa41adcbd6a3c520dd7a9f7317
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 #ifndef __ASM_CSKY_HIGHMEM_H
5 #define __ASM_CSKY_HIGHMEM_H
7 #ifdef __KERNEL__
9 #include <linux/init.h>
10 #include <linux/interrupt.h>
11 #include <linux/uaccess.h>
12 #include <asm/kmap_size.h>
13 #include <asm/cache.h>
15 /* undef for production */
16 #define HIGHMEM_DEBUG 1
18 /* declarations for highmem.c */
19 extern unsigned long highstart_pfn, highend_pfn;
21 extern pte_t *pkmap_page_table;
24 * Right now we initialize only a single pte table. It can be extended
25 * easily, subsequent pte tables have to be allocated in one physical
26 * chunk of RAM.
28 #define LAST_PKMAP 1024
29 #define LAST_PKMAP_MASK (LAST_PKMAP-1)
30 #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
31 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
33 #define ARCH_HAS_KMAP_FLUSH_TLB
34 extern void kmap_flush_tlb(unsigned long addr);
36 #define flush_cache_kmaps() do {} while (0)
38 #define arch_kmap_local_post_map(vaddr, pteval) kmap_flush_tlb(vaddr)
39 #define arch_kmap_local_post_unmap(vaddr) kmap_flush_tlb(vaddr)
41 extern void kmap_init(void);
43 #endif /* __KERNEL__ */
45 #endif /* __ASM_CSKY_HIGHMEM_H */