diff options
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/um/include/asm/fixmap.h | 40 |
2 files changed, 2 insertions, 39 deletions
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index fb3a6cc23015..88a330dcdede 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild | |||
@@ -4,4 +4,5 @@ generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h | |||
4 | generic-y += switch_to.h clkdev.h | 4 | generic-y += switch_to.h clkdev.h |
5 | generic-y += trace_clock.h | 5 | generic-y += trace_clock.h |
6 | generic-y += preempt.h | 6 | generic-y += preempt.h |
7 | generic-y += hash.h | ||
7 | generic-y += barrier.h | 8 | generic-y += barrier.h |
diff --git a/arch/um/include/asm/fixmap.h b/arch/um/include/asm/fixmap.h index 21a423bae5e8..3094ea3c73b0 100644 --- a/arch/um/include/asm/fixmap.h +++ b/arch/um/include/asm/fixmap.h | |||
@@ -43,13 +43,6 @@ enum fixed_addresses { | |||
43 | extern void __set_fixmap (enum fixed_addresses idx, | 43 | extern void __set_fixmap (enum fixed_addresses idx, |
44 | unsigned long phys, pgprot_t flags); | 44 | unsigned long phys, pgprot_t flags); |
45 | 45 | ||
46 | #define set_fixmap(idx, phys) \ | ||
47 | __set_fixmap(idx, phys, PAGE_KERNEL) | ||
48 | /* | ||
49 | * Some hardware wants to get fixmapped without caching. | ||
50 | */ | ||
51 | #define set_fixmap_nocache(idx, phys) \ | ||
52 | __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) | ||
53 | /* | 46 | /* |
54 | * used by vmalloc.c. | 47 | * used by vmalloc.c. |
55 | * | 48 | * |
@@ -62,37 +55,6 @@ extern void __set_fixmap (enum fixed_addresses idx, | |||
62 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) | 55 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) |
63 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) | 56 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) |
64 | 57 | ||
65 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) | 58 | #include <asm-generic/fixmap.h> |
66 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) | ||
67 | |||
68 | extern void __this_fixmap_does_not_exist(void); | ||
69 | |||
70 | /* | ||
71 | * 'index to address' translation. If anyone tries to use the idx | ||
72 | * directly without tranlation, we catch the bug with a NULL-deference | ||
73 | * kernel oops. Illegal ranges of incoming indices are caught too. | ||
74 | */ | ||
75 | static inline unsigned long fix_to_virt(const unsigned int idx) | ||
76 | { | ||
77 | /* | ||
78 | * this branch gets completely eliminated after inlining, | ||
79 | * except when someone tries to use fixaddr indices in an | ||
80 | * illegal way. (such as mixing up address types or using | ||
81 | * out-of-range indices). | ||
82 | * | ||
83 | * If it doesn't get removed, the linker will complain | ||
84 | * loudly with a reasonably clear error message.. | ||
85 | */ | ||
86 | if (idx >= __end_of_fixed_addresses) | ||
87 | __this_fixmap_does_not_exist(); | ||
88 | |||
89 | return __fix_to_virt(idx); | ||
90 | } | ||
91 | |||
92 | static inline unsigned long virt_to_fix(const unsigned long vaddr) | ||
93 | { | ||
94 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | ||
95 | return __virt_to_fix(vaddr); | ||
96 | } | ||
97 | 59 | ||
98 | #endif | 60 | #endif |