[ARM] msm: smd: Force the half_channel struct aligmnent to 4
authorDima Zavin <dima@android.com>
Sat, 9 Jan 2010 02:30:03 +0000 (18:30 -0800)
committerDaniel Walker <dwalker@codeaurora.org>
Wed, 12 May 2010 16:15:37 +0000 (09:15 -0700)
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>
arch/arm/mach-msm/smd_private.h

index 5a8831c..2da758e 100644 (file)
@@ -269,7 +269,7 @@ struct smd_half_channel {
        unsigned char fUNUSED;
        unsigned tail;
        unsigned head;
-} __attribute__((packed));
+} __attribute__(( aligned(4), packed ));
 
 struct smd_shared_v1 {
        struct smd_half_channel ch0;