On Tuesday 02 June 2009 00:00:12 matthieu castet wrote: > matthieu castet wrote: > > Hi, > > > > b43_generate_plcp_hdr generate unaligned access on mips with gcc [1] > > from openwrt. > > > > A small testcase [2] show that &plcp->data is access as a 32 bit aligned > > variable (see the "lw $2,0($4)" and "sw $2,0($4)"). > > I don't know enough mips to know if it is a gcc bug (ignoring the packed > > attribute) or something missing in b43 code. > For example using "plcp->data" instead "*data" produce the correct code. Uhm, I'm not sure. This code has been in the driver as-is forever and I don't see any unaligned access issues on mips (I checked a month or so ago). The plcp data structure is also __attribute__((packed)), so there can't be any unaligned accesses, as gcc is required to _expect_ unaligned accesses on structures with packed attribute. So it is required to do byte accesses on architectures where alignment matters. So I don't think there's an issue in the code. -- Greetings, Michael. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html