diff options
Diffstat (limited to 'arch/sh/include/asm/fixmap.h')
-rw-r--r-- | arch/sh/include/asm/fixmap.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/arch/sh/include/asm/fixmap.h b/arch/sh/include/asm/fixmap.h index 721fcc4d5e98..bd7e79a12653 100644 --- a/arch/sh/include/asm/fixmap.h +++ b/arch/sh/include/asm/fixmap.h | |||
@@ -14,9 +14,9 @@ | |||
14 | #define _ASM_FIXMAP_H | 14 | #define _ASM_FIXMAP_H |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/threads.h> | ||
17 | #include <asm/page.h> | 18 | #include <asm/page.h> |
18 | #ifdef CONFIG_HIGHMEM | 19 | #ifdef CONFIG_HIGHMEM |
19 | #include <linux/threads.h> | ||
20 | #include <asm/kmap_types.h> | 20 | #include <asm/kmap_types.h> |
21 | #endif | 21 | #endif |
22 | 22 | ||
@@ -46,19 +46,38 @@ | |||
46 | * fix-mapped? | 46 | * fix-mapped? |
47 | */ | 47 | */ |
48 | enum fixed_addresses { | 48 | enum fixed_addresses { |
49 | #define FIX_N_COLOURS 16 | 49 | /* |
50 | * The FIX_CMAP entries are used by kmap_coherent() to get virtual | ||
51 | * addresses which are of a known color, and so their values are | ||
52 | * important. __fix_to_virt(FIX_CMAP_END - n) must give an address | ||
53 | * which is the same color as a page (n<<PAGE_SHIFT). | ||
54 | */ | ||
55 | #define FIX_N_COLOURS 8 | ||
50 | FIX_CMAP_BEGIN, | 56 | FIX_CMAP_BEGIN, |
51 | FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS, | 57 | FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * NR_CPUS) - 1, |
52 | FIX_UNCACHED, | 58 | |
53 | #ifdef CONFIG_HIGHMEM | 59 | #ifdef CONFIG_HIGHMEM |
54 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ | 60 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ |
55 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, | 61 | FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_TYPE_NR * NR_CPUS) - 1, |
56 | #endif | 62 | #endif |
63 | |||
64 | #ifdef CONFIG_IOREMAP_FIXED | ||
65 | /* | ||
66 | * FIX_IOREMAP entries are useful for mapping physical address | ||
67 | * space before ioremap() is useable, e.g. really early in boot | ||
68 | * before kmalloc() is working. | ||
69 | */ | ||
70 | #define FIX_N_IOREMAPS 32 | ||
71 | FIX_IOREMAP_BEGIN, | ||
72 | FIX_IOREMAP_END = FIX_IOREMAP_BEGIN + FIX_N_IOREMAPS - 1, | ||
73 | #endif | ||
74 | |||
57 | __end_of_fixed_addresses | 75 | __end_of_fixed_addresses |
58 | }; | 76 | }; |
59 | 77 | ||
60 | extern void __set_fixmap(enum fixed_addresses idx, | 78 | extern void __set_fixmap(enum fixed_addresses idx, |
61 | unsigned long phys, pgprot_t flags); | 79 | unsigned long phys, pgprot_t flags); |
80 | extern void __clear_fixmap(enum fixed_addresses idx, pgprot_t flags); | ||
62 | 81 | ||
63 | #define set_fixmap(idx, phys) \ | 82 | #define set_fixmap(idx, phys) \ |
64 | __set_fixmap(idx, phys, PAGE_KERNEL) | 83 | __set_fixmap(idx, phys, PAGE_KERNEL) |