Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+13
+3
arch/arm/boot/compressed/head.S
··· 291 291 bl decompress_kernel 292 292 b call_kernel 293 293 294 + .align 2 294 295 .type LC0, #object 295 296 LC0: .word LC0 @ r1 296 297 .word __bss_start @ r2 ··· 590 589 * methods. Writeback caches _must_ have the flush method 591 590 * defined. 592 591 */ 592 + .align 2 593 593 .type proc_types,#object 594 594 proc_types: 595 595 .word 0x41560600 @ ARM6/610 ··· 947 945 * memory, which again must be relocatable. 948 946 */ 949 947 #ifdef DEBUG 948 + .align 2 950 949 .type phexbuf,#object 951 950 phexbuf: .space 12 952 951 .size phexbuf, . - phexbuf
+4
arch/arm/kernel/entry-armv.S
··· 1065 1065 ldr lr, [pc, lr, lsl #2] 1066 1066 movs pc, lr @ branch to handler in SVC mode 1067 1067 ENDPROC(vector_\name) 1068 + 1069 + .align 2 1070 + @ handler addresses follow this label 1071 + 1: 1068 1072 .endm 1069 1073 1070 1074 .globl __stubs_start
+2
arch/arm/kernel/head-common.S
··· 14 14 #define ATAG_CORE 0x54410001 15 15 #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) 16 16 17 + .align 2 17 18 .type __switch_data, %object 18 19 __switch_data: 19 20 .long __mmap_switched ··· 186 185 * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for 187 186 * more information about the __proc_info and __arch_info structures. 188 187 */ 188 + .align 2 189 189 .long __proc_info_begin 190 190 .long __proc_info_end 191 191 3: .long .
+2
arch/arm/lib/sha1.S
··· 187 187 188 188 ENDPROC(sha_transform) 189 189 190 + .align 2 190 191 .L_sha_K: 191 192 .word 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 192 193 ··· 196 195 * void sha_init(__u32 *buf) 197 196 */ 198 197 198 + .align 2 199 199 .L_sha_initial_digest: 200 200 .word 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 201 201
+2
arch/arm/vfp/entry.S
··· 42 42 mov pc, lr 43 43 ENDPROC(vfp_null_entry) 44 44 45 + .align 2 45 46 .LCvfp: 46 47 .word vfp_vector 47 48 ··· 62 61 mov pc, r9 @ we have handled the fault 63 62 ENDPROC(vfp_testing_entry) 64 63 64 + .align 2 65 65 VFP_arch_address: 66 66 .word VFP_arch 67 67