Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755300Ab1FTT3r (ORCPT ); Mon, 20 Jun 2011 15:29:47 -0400 Received: from relais.videotron.ca ([24.201.245.36]:45913 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009Ab1FTT3p (ORCPT ); Mon, 20 Jun 2011 15:29:45 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN; charset=US-ASCII Date: Mon, 20 Jun 2011 15:29:44 -0400 (EDT) From: Nicolas Pitre X-X-Sender: nico@xanadu.home To: Russell King - ARM Linux Cc: Arnd Bergmann , Alan Stern , gregkh@suse.de, linux-usb@vger.kernel.org, lkml , Rabin Vincent , Alexander Holler , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] USB: ehci: use packed, aligned(4) instead of removing the packed attribute In-reply-to: <20110620190240.GJ26089@n2100.arm.linux.org.uk> Message-id: References: <201106201858.45624.arnd@arndb.de> <20110620190240.GJ26089@n2100.arm.linux.org.uk> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1229 Lines: 27 On Mon, 20 Jun 2011, Russell King - ARM Linux wrote: > On Mon, Jun 20, 2011 at 06:58:45PM +0200, Arnd Bergmann wrote: > > We are also going to change the ARM implementation to always do 32 bit > > accesses in readl/writel, but the patch that went into the ehci driver > > was correct nonetheless. > > Not without someone doing a comparitively large amount of work to analyze > the effect of any change there and make sure that it doesn't have a > negative impact to drivers. This thread prompted me to investigate a bit. I have vague memories for the reasons why we decided to use plain C for the IO accessors as the inline assembly version didn't produce nearly the same code quality. It seems that GCC improved quite a bit there, and from a quick investigation, it looks like comparable code is being generated with the C and the inline asm versions with a recent enough GCC. This is certainly the case with the version causing issues with packed structures. Nicolas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/