This source file includes following definitions.
- __set_fixmap
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef _ASM_FIXMAP_H
15 #define _ASM_FIXMAP_H
16
17 #ifndef __ASSEMBLY__
18 #include <asm/page.h>
19 #include <asm/pgtable.h>
20 #ifdef CONFIG_HIGHMEM
21 #include <linux/threads.h>
22 #include <asm/kmap_types.h>
23 #endif
24
25 #ifdef CONFIG_KASAN
26 #include <asm/kasan.h>
27 #define FIXADDR_TOP (KASAN_SHADOW_START - PAGE_SIZE)
28 #else
29 #define FIXADDR_TOP ((unsigned long)(-PAGE_SIZE))
30 #endif
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 enum fixed_addresses {
51 FIX_HOLE,
52
53 FIX_EARLY_DEBUG_TOP = FIX_HOLE,
54 FIX_EARLY_DEBUG_BASE = FIX_EARLY_DEBUG_TOP+((128*1024)/PAGE_SIZE)-1,
55 #ifdef CONFIG_HIGHMEM
56 FIX_KMAP_BEGIN,
57 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
58 #endif
59 #ifdef CONFIG_PPC_8xx
60
61 #define FIX_IMMR_SIZE (512 * 1024 / PAGE_SIZE)
62 FIX_IMMR_START,
63 FIX_IMMR_BASE = __ALIGN_MASK(FIX_IMMR_START, FIX_IMMR_SIZE - 1) - 1 +
64 FIX_IMMR_SIZE,
65 #endif
66
67 __end_of_fixed_addresses
68 };
69
70 #define __FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
71 #define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE)
72
73 #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NCG
74
75 #include <asm-generic/fixmap.h>
76
77 static inline void __set_fixmap(enum fixed_addresses idx,
78 phys_addr_t phys, pgprot_t flags)
79 {
80 if (__builtin_constant_p(idx))
81 BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
82 else if (WARN_ON(idx >= __end_of_fixed_addresses))
83 return;
84
85 map_kernel_page(__fix_to_virt(idx), phys, flags);
86 }
87
88 #endif
89 #endif