0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef _ASM_HIGHMEM_H
0022 #define _ASM_HIGHMEM_H
0023
0024 #ifdef __KERNEL__
0025
0026 #include <linux/interrupt.h>
0027 #include <asm/cacheflush.h>
0028 #include <asm/page.h>
0029 #include <asm/fixmap.h>
0030
0031 extern pte_t *pkmap_page_table;
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #ifdef CONFIG_PPC_4K_PAGES
0045 #define PKMAP_ORDER PTE_SHIFT
0046 #else
0047 #define PKMAP_ORDER 9
0048 #endif
0049 #define LAST_PKMAP (1 << PKMAP_ORDER)
0050 #ifndef CONFIG_PPC_4K_PAGES
0051 #define PKMAP_BASE (FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1))
0052 #else
0053 #define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK)
0054 #endif
0055 #define LAST_PKMAP_MASK (LAST_PKMAP-1)
0056 #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
0057 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
0058
0059 #define flush_cache_kmaps() flush_cache_all()
0060
0061 #define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) \
0062 __set_pte_at(mm, vaddr, ptep, ptev, 1)
0063 #define arch_kmap_local_post_map(vaddr, pteval) \
0064 local_flush_tlb_page(NULL, vaddr)
0065 #define arch_kmap_local_post_unmap(vaddr) \
0066 local_flush_tlb_page(NULL, vaddr)
0067
0068 #endif
0069
0070 #endif