diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-24 07:32:52 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-24 07:32:52 -0400 |
commit | 88987ef91b99cf99bc5d167caeb31d4958fbf931 (patch) | |
tree | 95557c2fe408ad98d9547025ae98b0d0c1377aa2 /arch/arm | |
parent | 4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff) |
Thumb-2: Add some .align statements to the .S files
Since the Thumb-2 instructions can be 16-bit wide, data in the .text
sections may not be aligned to a 32-bit word and this leads to unaligned
exceptions. This patch does not affect the ARM code generation.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 3 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 4 | ||||
-rw-r--r-- | arch/arm/kernel/head-common.S | 2 | ||||
-rw-r--r-- | arch/arm/lib/sha1.S | 2 | ||||
-rw-r--r-- | arch/arm/vfp/entry.S | 2 |
5 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 4515728c5345..82f5fcfd9567 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -291,6 +291,7 @@ wont_overwrite: mov r0, r4 | |||
291 | bl decompress_kernel | 291 | bl decompress_kernel |
292 | b call_kernel | 292 | b call_kernel |
293 | 293 | ||
294 | .align 2 | ||
294 | .type LC0, #object | 295 | .type LC0, #object |
295 | LC0: .word LC0 @ r1 | 296 | LC0: .word LC0 @ r1 |
296 | .word __bss_start @ r2 | 297 | .word __bss_start @ r2 |
@@ -589,6 +590,7 @@ call_cache_fn: adr r12, proc_types | |||
589 | * methods. Writeback caches _must_ have the flush method | 590 | * methods. Writeback caches _must_ have the flush method |
590 | * defined. | 591 | * defined. |
591 | */ | 592 | */ |
593 | .align 2 | ||
592 | .type proc_types,#object | 594 | .type proc_types,#object |
593 | proc_types: | 595 | proc_types: |
594 | .word 0x41560600 @ ARM6/610 | 596 | .word 0x41560600 @ ARM6/610 |
@@ -945,6 +947,7 @@ __armv3_mpu_cache_flush: | |||
945 | * memory, which again must be relocatable. | 947 | * memory, which again must be relocatable. |
946 | */ | 948 | */ |
947 | #ifdef DEBUG | 949 | #ifdef DEBUG |
950 | .align 2 | ||
948 | .type phexbuf,#object | 951 | .type phexbuf,#object |
949 | phexbuf: .space 12 | 952 | phexbuf: .space 12 |
950 | .size phexbuf, . - phexbuf | 953 | .size phexbuf, . - phexbuf |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index fc8af43c5000..0befd1cabf45 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -1065,6 +1065,10 @@ vector_\name: | |||
1065 | ldr lr, [pc, lr, lsl #2] | 1065 | ldr lr, [pc, lr, lsl #2] |
1066 | movs pc, lr @ branch to handler in SVC mode | 1066 | movs pc, lr @ branch to handler in SVC mode |
1067 | ENDPROC(vector_\name) | 1067 | ENDPROC(vector_\name) |
1068 | |||
1069 | .align 2 | ||
1070 | @ handler addresses follow this label | ||
1071 | 1: | ||
1068 | .endm | 1072 | .endm |
1069 | 1073 | ||
1070 | .globl __stubs_start | 1074 | .globl __stubs_start |
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index 991952c644d1..dbfaef07a1f4 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -14,6 +14,7 @@ | |||
14 | #define ATAG_CORE 0x54410001 | 14 | #define ATAG_CORE 0x54410001 |
15 | #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) | 15 | #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) |
16 | 16 | ||
17 | .align 2 | ||
17 | .type __switch_data, %object | 18 | .type __switch_data, %object |
18 | __switch_data: | 19 | __switch_data: |
19 | .long __mmap_switched | 20 | .long __mmap_switched |
@@ -185,6 +186,7 @@ ENDPROC(lookup_processor_type) | |||
185 | * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for | 186 | * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for |
186 | * more information about the __proc_info and __arch_info structures. | 187 | * more information about the __proc_info and __arch_info structures. |
187 | */ | 188 | */ |
189 | .align 2 | ||
188 | .long __proc_info_begin | 190 | .long __proc_info_begin |
189 | .long __proc_info_end | 191 | .long __proc_info_end |
190 | 3: .long . | 192 | 3: .long . |
diff --git a/arch/arm/lib/sha1.S b/arch/arm/lib/sha1.S index a16fb208c841..09b548cac1a4 100644 --- a/arch/arm/lib/sha1.S +++ b/arch/arm/lib/sha1.S | |||
@@ -187,6 +187,7 @@ ENTRY(sha_transform) | |||
187 | 187 | ||
188 | ENDPROC(sha_transform) | 188 | ENDPROC(sha_transform) |
189 | 189 | ||
190 | .align 2 | ||
190 | .L_sha_K: | 191 | .L_sha_K: |
191 | .word 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 | 192 | .word 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 |
192 | 193 | ||
@@ -195,6 +196,7 @@ ENDPROC(sha_transform) | |||
195 | * void sha_init(__u32 *buf) | 196 | * void sha_init(__u32 *buf) |
196 | */ | 197 | */ |
197 | 198 | ||
199 | .align 2 | ||
198 | .L_sha_initial_digest: | 200 | .L_sha_initial_digest: |
199 | .word 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 | 201 | .word 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 |
200 | 202 | ||
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index a2bed62aec21..4fa9903b83cf 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -42,6 +42,7 @@ ENTRY(vfp_null_entry) | |||
42 | mov pc, lr | 42 | mov pc, lr |
43 | ENDPROC(vfp_null_entry) | 43 | ENDPROC(vfp_null_entry) |
44 | 44 | ||
45 | .align 2 | ||
45 | .LCvfp: | 46 | .LCvfp: |
46 | .word vfp_vector | 47 | .word vfp_vector |
47 | 48 | ||
@@ -61,6 +62,7 @@ ENTRY(vfp_testing_entry) | |||
61 | mov pc, r9 @ we have handled the fault | 62 | mov pc, r9 @ we have handled the fault |
62 | ENDPROC(vfp_testing_entry) | 63 | ENDPROC(vfp_testing_entry) |
63 | 64 | ||
65 | .align 2 | ||
64 | VFP_arch_address: | 66 | VFP_arch_address: |
65 | .word VFP_arch | 67 | .word VFP_arch |
66 | 68 | ||