diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/highmem.h | 28 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 13 |
2 files changed, 38 insertions, 3 deletions
diff --git a/arch/arm/include/asm/highmem.h b/arch/arm/include/asm/highmem.h new file mode 100644 index 000000000000..023d5b374544 --- /dev/null +++ b/arch/arm/include/asm/highmem.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef _ASM_HIGHMEM_H | ||
2 | #define _ASM_HIGHMEM_H | ||
3 | |||
4 | #include <asm/kmap_types.h> | ||
5 | |||
6 | #define PKMAP_BASE (PAGE_OFFSET - PMD_SIZE) | ||
7 | #define LAST_PKMAP PTRS_PER_PTE | ||
8 | #define LAST_PKMAP_MASK (LAST_PKMAP - 1) | ||
9 | #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT) | ||
10 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | ||
11 | |||
12 | #define kmap_prot PAGE_KERNEL | ||
13 | |||
14 | #define flush_cache_kmaps() flush_cache_all() | ||
15 | |||
16 | extern pte_t *pkmap_page_table; | ||
17 | |||
18 | extern void *kmap_high(struct page *page); | ||
19 | extern void kunmap_high(struct page *page); | ||
20 | |||
21 | extern void *kmap(struct page *page); | ||
22 | extern void kunmap(struct page *page); | ||
23 | extern void *kmap_atomic(struct page *page, enum km_type type); | ||
24 | extern void kunmap_atomic(void *kvaddr, enum km_type type); | ||
25 | extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); | ||
26 | extern struct page *kmap_atomic_to_page(const void *ptr); | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 0202a7c20e62..ae472bc376d3 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -44,14 +44,21 @@ | |||
44 | * The module space lives between the addresses given by TASK_SIZE | 44 | * The module space lives between the addresses given by TASK_SIZE |
45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | 45 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. |
46 | */ | 46 | */ |
47 | #define MODULES_END (PAGE_OFFSET) | 47 | #define MODULES_VADDR (PAGE_OFFSET - 16*1024*1024) |
48 | #define MODULES_VADDR (MODULES_END - 16*1048576) | ||
49 | |||
50 | #if TASK_SIZE > MODULES_VADDR | 48 | #if TASK_SIZE > MODULES_VADDR |
51 | #error Top of user space clashes with start of module space | 49 | #error Top of user space clashes with start of module space |
52 | #endif | 50 | #endif |
53 | 51 | ||
54 | /* | 52 | /* |
53 | * The highmem pkmap virtual space shares the end of the module area. | ||
54 | */ | ||
55 | #ifdef CONFIG_HIGHMEM | ||
56 | #define MODULES_END (PAGE_OFFSET - PMD_SIZE) | ||
57 | #else | ||
58 | #define MODULES_END (PAGE_OFFSET) | ||
59 | #endif | ||
60 | |||
61 | /* | ||
55 | * The XIP kernel gets mapped at the bottom of the module vm area. | 62 | * The XIP kernel gets mapped at the bottom of the module vm area. |
56 | * Since we use sections to map it, this macro replaces the physical address | 63 | * Since we use sections to map it, this macro replaces the physical address |
57 | * with its virtual address while keeping offset from the base section. | 64 | * with its virtual address while keeping offset from the base section. |