1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef _ASM_HIGHMEM_H
22#define _ASM_HIGHMEM_H
23
24#ifdef __KERNEL__
25
26#include <linux/interrupt.h>
27#include <asm/cacheflush.h>
28#include <asm/page.h>
29#include <asm/fixmap.h>
30
31extern pte_t *pkmap_page_table;
32
33
34
35
36
37
38
39
40
41
42
43
44#ifdef CONFIG_PPC_4K_PAGES
45#define PKMAP_ORDER PTE_SHIFT
46#else
47#define PKMAP_ORDER 9
48#endif
49#define LAST_PKMAP (1 << PKMAP_ORDER)
50#ifndef CONFIG_PPC_4K_PAGES
51#define PKMAP_BASE (FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1))
52#else
53#define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK)
54#endif
55#define LAST_PKMAP_MASK (LAST_PKMAP-1)
56#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
57#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
58
59#define flush_cache_kmaps() flush_cache_all()
60
61#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) \
62 __set_pte_at(mm, vaddr, ptep, ptev, 1)
63#define arch_kmap_local_post_map(vaddr, pteval) \
64 local_flush_tlb_page(NULL, vaddr)
65#define arch_kmap_local_post_unmap(vaddr) \
66 local_flush_tlb_page(NULL, vaddr)
67
68#endif
69
70#endif
71