diff options
Diffstat (limited to 'arch/arm/include/asm/fixmap.h')
-rw-r--r-- | arch/arm/include/asm/fixmap.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h index bbae919bceb4..74124b0d0d79 100644 --- a/arch/arm/include/asm/fixmap.h +++ b/arch/arm/include/asm/fixmap.h | |||
@@ -1,24 +1,11 @@ | |||
1 | #ifndef _ASM_FIXMAP_H | 1 | #ifndef _ASM_FIXMAP_H |
2 | #define _ASM_FIXMAP_H | 2 | #define _ASM_FIXMAP_H |
3 | 3 | ||
4 | /* | 4 | #define FIXADDR_START 0xffc00000UL |
5 | * Nothing too fancy for now. | 5 | #define FIXADDR_TOP 0xffe00000UL |
6 | * | ||
7 | * On ARM we already have well known fixed virtual addresses imposed by | ||
8 | * the architecture such as the vector page which is located at 0xffff0000, | ||
9 | * therefore a second level page table is already allocated covering | ||
10 | * 0xfff00000 upwards. | ||
11 | * | ||
12 | * The cache flushing code in proc-xscale.S uses the virtual area between | ||
13 | * 0xfffe0000 and 0xfffeffff. | ||
14 | */ | ||
15 | |||
16 | #define FIXADDR_START 0xfff00000UL | ||
17 | #define FIXADDR_TOP 0xfffe0000UL | ||
18 | #define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START) | 6 | #define FIXADDR_SIZE (FIXADDR_TOP - FIXADDR_START) |
19 | 7 | ||
20 | #define FIX_KMAP_BEGIN 0 | 8 | #define FIX_KMAP_NR_PTES (FIXADDR_SIZE >> PAGE_SHIFT) |
21 | #define FIX_KMAP_END (FIXADDR_SIZE >> PAGE_SHIFT) | ||
22 | 9 | ||
23 | #define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT)) | 10 | #define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT)) |
24 | #define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT) | 11 | #define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT) |
@@ -27,7 +14,7 @@ extern void __this_fixmap_does_not_exist(void); | |||
27 | 14 | ||
28 | static inline unsigned long fix_to_virt(const unsigned int idx) | 15 | static inline unsigned long fix_to_virt(const unsigned int idx) |
29 | { | 16 | { |
30 | if (idx >= FIX_KMAP_END) | 17 | if (idx >= FIX_KMAP_NR_PTES) |
31 | __this_fixmap_does_not_exist(); | 18 | __this_fixmap_does_not_exist(); |
32 | return __fix_to_virt(idx); | 19 | return __fix_to_virt(idx); |
33 | } | 20 | } |