0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef _ASM_HIGHMEM_H
0019 #define _ASM_HIGHMEM_H
0020
0021 #ifdef __KERNEL__
0022
0023 #include <linux/bug.h>
0024 #include <linux/interrupt.h>
0025 #include <linux/uaccess.h>
0026 #include <asm/cpu-features.h>
0027 #include <asm/kmap_size.h>
0028
0029
0030 extern unsigned long highstart_pfn, highend_pfn;
0031
0032 extern pte_t *pkmap_page_table;
0033
0034
0035
0036
0037
0038
0039 #if defined(CONFIG_PHYS_ADDR_T_64BIT) || defined(CONFIG_MIPS_HUGE_TLB_SUPPORT)
0040 #define LAST_PKMAP 512
0041 #else
0042 #define LAST_PKMAP 1024
0043 #endif
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 ARCH_HAS_KMAP_FLUSH_TLB
0050 extern void kmap_flush_tlb(unsigned long addr);
0051
0052 #define flush_cache_kmaps() BUG_ON(cpu_has_dc_aliases)
0053
0054 #define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) set_pte(ptep, ptev)
0055 #define arch_kmap_local_post_map(vaddr, pteval) local_flush_tlb_one(vaddr)
0056 #define arch_kmap_local_post_unmap(vaddr) local_flush_tlb_one(vaddr)
0057
0058 #endif
0059
0060 #endif