0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef _ASM_HIGHMEM_H
0020 #define _ASM_HIGHMEM_H
0021
0022 #ifdef __KERNEL__
0023
0024 #include <linux/interrupt.h>
0025 #include <linux/pgtable.h>
0026 #include <asm/vaddrs.h>
0027 #include <asm/pgtsrmmu.h>
0028
0029
0030 extern unsigned long highstart_pfn, highend_pfn;
0031
0032 #define kmap_prot __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE)
0033 extern pte_t *pkmap_page_table;
0034
0035
0036
0037
0038
0039
0040
0041 #define LAST_PKMAP 1024
0042 #define PKMAP_SIZE (LAST_PKMAP << PAGE_SHIFT)
0043 #define PKMAP_BASE PMD_ALIGN(SRMMU_NOCACHE_VADDR + (SRMMU_MAX_NOCACHE_PAGES << PAGE_SHIFT))
0044
0045 #define LAST_PKMAP_MASK (LAST_PKMAP - 1)
0046 #define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
0047 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
0048
0049 #define PKMAP_END (PKMAP_ADDR(LAST_PKMAP))
0050
0051 #define flush_cache_kmaps() flush_cache_all()
0052
0053
0054 #define arch_kmap_local_pre_map(vaddr, pteval) flush_cache_all()
0055 #define arch_kmap_local_pre_unmap(vaddr) flush_cache_all()
0056 #define arch_kmap_local_post_map(vaddr, pteval) flush_tlb_all()
0057 #define arch_kmap_local_post_unmap(vaddr) flush_tlb_all()
0058
0059 #endif
0060
0061 #endif