diff options
Diffstat (limited to 'include/asm-arm/memory.h')
| -rw-r--r-- | include/asm-arm/memory.h | 25 | 
1 files changed, 21 insertions, 4 deletions
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index a8a933a775db..a547ee598c6c 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h  | |||
| @@ -12,6 +12,16 @@ | |||
| 12 | #ifndef __ASM_ARM_MEMORY_H | 12 | #ifndef __ASM_ARM_MEMORY_H | 
| 13 | #define __ASM_ARM_MEMORY_H | 13 | #define __ASM_ARM_MEMORY_H | 
| 14 | 14 | ||
| 15 | /* | ||
| 16 | * Allow for constants defined here to be used from assembly code | ||
| 17 | * by prepending the UL suffix only with actual C code compilation. | ||
| 18 | */ | ||
| 19 | #ifndef __ASSEMBLY__ | ||
| 20 | #define UL(x) (x##UL) | ||
| 21 | #else | ||
| 22 | #define UL(x) (x) | ||
| 23 | #endif | ||
| 24 | |||
| 15 | #include <linux/config.h> | 25 | #include <linux/config.h> | 
| 16 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> | 
| 17 | #include <asm/arch/memory.h> | 27 | #include <asm/arch/memory.h> | 
| @@ -21,20 +31,20 @@ | |||
| 21 | * TASK_SIZE - the maximum size of a user space task. | 31 | * TASK_SIZE - the maximum size of a user space task. | 
| 22 | * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area | 32 | * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area | 
| 23 | */ | 33 | */ | 
| 24 | #define TASK_SIZE (0xbf000000UL) | 34 | #define TASK_SIZE UL(0xbf000000) | 
| 25 | #define TASK_UNMAPPED_BASE (0x40000000UL) | 35 | #define TASK_UNMAPPED_BASE UL(0x40000000) | 
| 26 | #endif | 36 | #endif | 
| 27 | 37 | ||
| 28 | /* | 38 | /* | 
| 29 | * The maximum size of a 26-bit user space task. | 39 | * The maximum size of a 26-bit user space task. | 
| 30 | */ | 40 | */ | 
| 31 | #define TASK_SIZE_26 (0x04000000UL) | 41 | #define TASK_SIZE_26 UL(0x04000000) | 
| 32 | 42 | ||
| 33 | /* | 43 | /* | 
| 34 | * Page offset: 3GB | 44 | * Page offset: 3GB | 
| 35 | */ | 45 | */ | 
| 36 | #ifndef PAGE_OFFSET | 46 | #ifndef PAGE_OFFSET | 
| 37 | #define PAGE_OFFSET (0xc0000000UL) | 47 | #define PAGE_OFFSET UL(0xc0000000) | 
| 38 | #endif | 48 | #endif | 
| 39 | 49 | ||
| 40 | /* | 50 | /* | 
| @@ -58,6 +68,13 @@ | |||
| 58 | #error Top of user space clashes with start of module space | 68 | #error Top of user space clashes with start of module space | 
| 59 | #endif | 69 | #endif | 
| 60 | 70 | ||
| 71 | /* | ||
| 72 | * The XIP kernel gets mapped at the bottom of the module vm area. | ||
| 73 | * Since we use sections to map it, this macro replaces the physical address | ||
| 74 | * with its virtual address while keeping offset from the base section. | ||
| 75 | */ | ||
| 76 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | ||
| 77 | |||
| 61 | #ifndef __ASSEMBLY__ | 78 | #ifndef __ASSEMBLY__ | 
| 62 | 79 | ||
| 63 | /* | 80 | /* | 
