From: Felix Fietkau Date: Fri, 28 Dec 2012 21:30:24 +0000 (+0000) Subject: ar71xx: change the unaligned access hack to assume an alignment of 2 bytes, slightly... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=96b73b8c4a93c345cbaa32c207624eaa27238093 ar71xx: change the unaligned access hack to assume an alignment of 2 bytes, slightly improves performance and code size SVN-Revision: 34912 --- diff --git a/target/linux/ar71xx/patches-3.6/902-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-3.6/902-unaligned_access_hacks.patch index 921cf194d6..557ab14d10 100644 --- a/target/linux/ar71xx/patches-3.6/902-unaligned_access_hacks.patch +++ b/target/linux/ar71xx/patches-3.6/902-unaligned_access_hacks.patch @@ -57,7 +57,7 @@ __be32 daddr; /*The options start here. */ -}; -+} __packed; ++} __packed __attribute__((aligned(2))); #ifdef __KERNEL__ #include @@ -68,7 +68,7 @@ struct in6_addr saddr; struct in6_addr daddr; -}; -+} __packed; ++} __packed __attribute__((aligned(2))); #ifdef __KERNEL__ /* @@ -79,7 +79,7 @@ __sum16 check; __be16 urg_ptr; -}; -+} __packed; ++} __packed __attribute__((aligned(2))); /* * The union cast uses a gcc extension to avoid aliasing problems @@ -90,7 +90,7 @@ __be16 len; __sum16 check; -}; -+} __packed; ++} __packed __attribute__((aligned(2))); /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments */