|
Lines 19-38
enum fixed_addresses {
Link Here
|
| 19 |
FIX_TEXT_POKE0, |
19 |
FIX_TEXT_POKE0, |
| 20 |
FIX_TEXT_POKE1, |
20 |
FIX_TEXT_POKE1, |
| 21 |
|
21 |
|
| 22 |
__end_of_fixed_addresses |
22 |
__end_of_fixmap_region, |
|
|
23 |
|
| 24 |
/* |
| 25 |
* Share the kmap() region with early_ioremap(): this is guaranteed |
| 26 |
* not to clash since early_ioremap() is only available before |
| 27 |
* paging_init(), and kmap() only after. |
| 28 |
*/ |
| 29 |
#define NR_FIX_BTMAPS 32 |
| 30 |
#define FIX_BTMAPS_SLOTS 7 |
| 31 |
#define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) |
| 32 |
|
| 33 |
FIX_BTMAP_END = __end_of_permanent_fixed_addresses, |
| 34 |
FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1, |
| 35 |
__end_of_early_ioremap_region |
| 23 |
}; |
36 |
}; |
| 24 |
|
37 |
|
|
|
38 |
static const enum fixed_addresses __end_of_fixed_addresses = |
| 39 |
__end_of_fixmap_region > __end_of_early_ioremap_region ? |
| 40 |
__end_of_fixmap_region : __end_of_early_ioremap_region; |
| 41 |
|
| 25 |
#define FIXMAP_PAGE_COMMON (L_PTE_YOUNG | L_PTE_PRESENT | L_PTE_XN | L_PTE_DIRTY) |
42 |
#define FIXMAP_PAGE_COMMON (L_PTE_YOUNG | L_PTE_PRESENT | L_PTE_XN | L_PTE_DIRTY) |
| 26 |
|
43 |
|
| 27 |
#define FIXMAP_PAGE_NORMAL (FIXMAP_PAGE_COMMON | L_PTE_MT_WRITEBACK) |
44 |
#define FIXMAP_PAGE_NORMAL (FIXMAP_PAGE_COMMON | L_PTE_MT_WRITEBACK) |
|
|
45 |
#define FIXMAP_PAGE_RO (FIXMAP_PAGE_NORMAL | L_PTE_RDONLY) |
| 28 |
|
46 |
|
| 29 |
/* Used by set_fixmap_(io|nocache), both meant for mapping a device */ |
47 |
/* Used by set_fixmap_(io|nocache), both meant for mapping a device */ |
| 30 |
#define FIXMAP_PAGE_IO (FIXMAP_PAGE_COMMON | L_PTE_MT_DEV_SHARED | L_PTE_SHARED) |
48 |
#define FIXMAP_PAGE_IO (FIXMAP_PAGE_COMMON | L_PTE_MT_DEV_SHARED | L_PTE_SHARED) |
| 31 |
#define FIXMAP_PAGE_NOCACHE FIXMAP_PAGE_IO |
49 |
#define FIXMAP_PAGE_NOCACHE FIXMAP_PAGE_IO |
| 32 |
|
50 |
|
|
|
51 |
#define __early_set_fixmap __set_fixmap |
| 52 |
|
| 53 |
#ifdef CONFIG_MMU |
| 54 |
|
| 33 |
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot); |
55 |
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot); |
| 34 |
void __init early_fixmap_init(void); |
56 |
void __init early_fixmap_init(void); |
| 35 |
|
57 |
|
| 36 |
#include <asm-generic/fixmap.h> |
58 |
#include <asm-generic/fixmap.h> |
| 37 |
|
59 |
|
|
|
60 |
#else |
| 61 |
|
| 62 |
static inline void early_fixmap_init(void) { } |
| 63 |
|
| 64 |
#endif |
| 38 |
#endif |
65 |
#endif |