Эх сурвалжийг харах

[ARM] msm: smd: Force the half_channel struct aligmnent to 4

Forcing the alignment prevents gcc from generating byte reads for word
member variables. Lack of this caused issues when the app processor
modified struct members and the modem saw a partial word write.

Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Dima Zavin 15 жил өмнө
parent
commit
93873bcbd1

+ 1 - 1
arch/arm/mach-msm/smd_private.h

@@ -269,7 +269,7 @@ struct smd_half_channel {
 	unsigned char fUNUSED;
 	unsigned char fUNUSED;
 	unsigned tail;
 	unsigned tail;
 	unsigned head;
 	unsigned head;
-} __attribute__((packed));
+} __attribute__(( aligned(4), packed ));
 
 
 struct smd_shared_v1 {
 struct smd_shared_v1 {
 	struct smd_half_channel ch0;
 	struct smd_half_channel ch0;