Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 #ifndef __ASM_CSKY_HIGHMEM_H
0004 #define __ASM_CSKY_HIGHMEM_H
0005 
0006 #ifdef __KERNEL__
0007 
0008 #include <linux/init.h>
0009 #include <linux/interrupt.h>
0010 #include <linux/uaccess.h>
0011 #include <asm/kmap_size.h>
0012 #include <asm/cache.h>
0013 
0014 /* undef for production */
0015 #define HIGHMEM_DEBUG 1
0016 
0017 /* declarations for highmem.c */
0018 extern unsigned long highstart_pfn, highend_pfn;
0019 
0020 extern pte_t *pkmap_page_table;
0021 
0022 /*
0023  * Right now we initialize only a single pte table. It can be extended
0024  * easily, subsequent pte tables have to be allocated in one physical
0025  * chunk of RAM.
0026  */
0027 #define LAST_PKMAP 1024
0028 #define LAST_PKMAP_MASK (LAST_PKMAP-1)
0029 #define PKMAP_NR(virt)  ((virt-PKMAP_BASE) >> PAGE_SHIFT)
0030 #define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr) << PAGE_SHIFT))
0031 
0032 #define ARCH_HAS_KMAP_FLUSH_TLB
0033 extern void kmap_flush_tlb(unsigned long addr);
0034 
0035 #define flush_cache_kmaps() do {} while (0)
0036 
0037 #define arch_kmap_local_post_map(vaddr, pteval) kmap_flush_tlb(vaddr)
0038 #define arch_kmap_local_post_unmap(vaddr)   kmap_flush_tlb(vaddr)
0039 
0040 extern void kmap_init(void);
0041 
0042 #endif /* __KERNEL__ */
0043 
0044 #endif /* __ASM_CSKY_HIGHMEM_H */