4 #include <asm/kmap_types.h>
6 #define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE)
7 #define LAST_PKMAP PTRS_PER_PTE
8 #define LAST_PKMAP_MASK (LAST_PKMAP - 1)
9 #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT)
10 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
12 #define kmap_prot PAGE_KERNEL
14 #define flush_cache_kmaps() flush_cache_all()
16 extern pte_t
*pkmap_page_table
;
18 #define ARCH_NEEDS_KMAP_HIGH_GET
20 extern void *kmap_high(struct page
*page
);
21 extern void *kmap_high_get(struct page
*page
);
22 extern void kunmap_high(struct page
*page
);
24 extern void *kmap(struct page
*page
);
25 extern void kunmap(struct page
*page
);
26 extern void *kmap_atomic(struct page
*page
, enum km_type type
);
27 extern void kunmap_atomic(void *kvaddr
, enum km_type type
);
28 extern void *kmap_atomic_pfn(unsigned long pfn
, enum km_type type
);
29 extern struct page
*kmap_atomic_to_page(const void *ptr
);