From: Albert ARIBAUD Date: Fri, 22 Jun 2012 13:16:54 +0200 Subject: [U-Boot] [PATCH] arm: enable unaligned access on ARMv7 In-Reply-To: <1340357816.1381.21.camel@tellur> References: <1338918451-10126-1-git-send-email-dev@lynxeye.de> <4FCE52FB.3020501@wwwdotorg.org> <1338923180.1377.2.camel@tellur> <20120622111501.21e1fdcc@aari01-12> <1340357816.1381.21.camel@tellur> Message-ID: <20120622131654.2c694a82@aari01-12> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Lucas, > > > Linux in particular does reinitialize this state and I expect any > > > reasonable OS to do so. > > > > Then what is the point of enabling it on U-Boot? Does it fix some > > issue whereby some mis-aligned piece of data cannot be properly > > aligned? > > > Yes, it fixes U-Boot USB on Tegra, when built with a recent toolchain. > Fixing the alignment of some of the structures in the USB code should > also be done, but this is a whole lot more invasive and requires some > more thought, as the discussion about this on LKML shows. The issue > doesn't show for older toolchains, as they by default emit code to > work around unaligned accesses. > > This patch fixes all unaligned issues, that may appear with recent > toolchains. We avoid having to instruct the toolchain to work around > unaligned accesses and gain better performance in cases where it is > needed. I am not too happy with enabling a lax behavior only to avoid an issue which apparently is diagnosed and could / should be fixed at its root. Can you point me to the relevant LKML thread so that I get the details and understand what prevents fixing this by 'simply' aligning the USB structures? > Thanks, > Lucas Amicalement, -- Albert.