Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757010Ab3HAVYe (ORCPT ); Thu, 1 Aug 2013 17:24:34 -0400 Received: from mail-qa0-f46.google.com ([209.85.216.46]:36916 "EHLO mail-qa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756692Ab3HAVYc (ORCPT ); Thu, 1 Aug 2013 17:24:32 -0400 MIME-Version: 1.0 X-Originating-IP: [173.13.129.225] In-Reply-To: <20130801.141016.1475274289112004539.davem@davemloft.net> References: <20130801205817.GJ23006@n2100.arm.linux.org.uk> <1375391087.2034.82.camel@joe-AO722> <20130801210618.GK23006@n2100.arm.linux.org.uk> <20130801.141016.1475274289112004539.davem@davemloft.net> Date: Thu, 1 Aug 2013 14:24:32 -0700 Message-ID: Subject: Re: [PATCH V2 3/3] ethernet: Convert mac address uses of 6 to ETH_ALEN From: Olof Johansson To: David Miller Cc: Russell King - ARM Linux , Joe Perches , Sam Creasey , Grant Grundler , ZongShun Wan , Rajesh Borundia , Network Development , Sony Chacko , "linux-kernel@vger.kernel.org" , Manish Chopra , Don Fry , Ron Mercer , Andrew Gallatin , linux-driver@qlogic.com, Jitendra Kalsaria , "linux-arm-kernel@lists.infradead.org" , Shahed Shaikh Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1777 Lines: 43 On Thu, Aug 1, 2013 at 2:10 PM, David Miller wrote: > From: Russell King - ARM Linux > Date: Thu, 1 Aug 2013 22:06:18 +0100 > >> On Thu, Aug 01, 2013 at 02:04:47PM -0700, Joe Perches wrote: >>> On Thu, 2013-08-01 at 21:58 +0100, Russell King - ARM Linux wrote: >>> > This seems rather obscure - I mean, it's not obvious to driver authors >>> > that should be the case. Would it not be better to make this a little >>> > more obvious somehow? Maybe __aligned(2) against mac_addr? Or >>> > maybe have a debugging check for it? >>> >>> That'd be for David Miller (cc'd). >>> >>> I believe he's argued in the past that any alignment check >>> for mac addresses was unnecessary. >>> >>> For all I know it really might not matter because pasemi >>> can successfully dereference a ushort against an odd char >>> pointer. >>> >>> I just noticed it and thought it'd be better moved. >> >> As can ARM too for years now - either in hardware or via fixup for >> kernel code. > > But probably not a good idea if it's done in a fast path. This particular driver is for the PA Semi chips, and I very much doubt that compatible hardware will ever show up anywhere else; they're fairly dependent on the I/O architecture of the chip and Apple has not brought those aspects forward in their ARM chips, as far as I know. So, you might as well leave the code alone for now. It's not used on fast path, and the system definitely handles unaligned accesses for this -- it has for years already. -Olof -- 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/