diff options
author | Nicolas Pitre <nico@cam.org> | 2005-10-29 16:44:55 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-29 16:44:55 -0400 |
commit | f09b99799991c7c3ba441162406247f5df077322 (patch) | |
tree | 6284aa6638744c26059001a11da3267f91d50082 /include/asm-arm/memory.h | |
parent | c514e58cb8eac0d21f4ab5011df75a09eb5edd50 (diff) |
[ARM] 3060/1: allow constants found in asm/memory.h to be used in asm code
Patch from Nicolas Pitre
This patch allows for assorted type of cleanups by letting assembly code
use the same set of defines for constant values and avoid duplicated
definitions that might not always be in sync, or that might simply be
confusing due to the different names for the same thing.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/memory.h')
-rw-r--r-- | include/asm-arm/memory.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index a8a933a775db..bee10fcf7e83 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 | /* |