From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Roskin Date: Mon, 22 Mar 2010 17:49:34 -0400 Subject: [ath9k-devel] unaligned accesses In-Reply-To: <40101cc31003221109t30343194x146c4c37a15a7119@mail.gmail.com> References: <40101cc31003221109t30343194x146c4c37a15a7119@mail.gmail.com> Message-ID: <1269294574.1237.114.camel@mj> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Mon, 2010-03-22 at 19:09 +0100, Matteo Croce wrote: > I'm using ath9k on a MIPS platform, and the driver seems to do _lot_ of > unaligned accesses, something like 270.000/sec My first reaction was to reproduce it, but the only mips system I have is a La Fonera router, which has no PCI. I checked if it's possible to enable alignment checking on x86_64, but it looks like gcc would use unaligned access on its own to initialize data, so there will be massive false positives: http://stackoverflow.com/questions/1929588/x86-howto-catch-data-alignment-faults-aka-sigbus-on-sparc > u=$(cat /sys/kernel/debug/mips/unaligned_instructions) I checked the sources for "unaligned_instructions" and found "unaligned_action" nearby. If set to 2 (UNALIGNED_ACTION_SHOW), it would print registers, and then perhaps you could find the exact location in the kernel. -- Regards, Pavel Roskin