From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754572Ab1ASWPl (ORCPT ); Wed, 19 Jan 2011 17:15:41 -0500 Received: from mail.openrapids.net ([64.15.138.104]:40750 "EHLO blackscsi.openrapids.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753975Ab1ASWPk (ORCPT ); Wed, 19 Jan 2011 17:15:40 -0500 Date: Wed, 19 Jan 2011 17:15:38 -0500 From: Mathieu Desnoyers To: David Miller Cc: rostedt@goodmis.org, richm@oldelvet.org.uk, 609371@bugs.debian.org, ben@decadent.org.uk, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, mingo@redhat.com Subject: Re: Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36 Message-ID: <20110119221538.GB23544@Krystal> References: <20110119161534.GB15031@Krystal> <1295460822.12215.1389.camel@gandalf.stny.rr.com> <20110119182052.GB18970@Krystal> <20110119.134428.71569409.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110119.134428.71569409.davem@davemloft.net> X-Editor: vi X-Info: http://www.efficios.com X-Operating-System: Linux/2.6.26-2-686 (i686) X-Uptime: 17:13:36 up 57 days, 3:16, 4 users, load average: 0.01, 0.03, 0.00 User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * David Miller (davem@davemloft.net) wrote: > From: Mathieu Desnoyers > Date: Wed, 19 Jan 2011 13:20:53 -0500 > > > Now what I'm discussing with David Miller is if creating a > > > > __long_packed_aligned > > > > and using it for *both* type and variable alignment would be more palatable (it > > also works, and is more compact). > > As I mentioned in another reply, we should not be using packed. > > Packed has other implications, which makes it use byte-at-a-time accesses > for all parts of a structure when you tag it with 'packed'. GCC doesn't > try to be clever and see that actually such accesses are safe. Please see my explanation about the difference between "packed" and "packed, aligned(4 or 8)" in the other thread. I share your concern about ugly code generated by "packed", but my tests with a sparc32 gcc show that using both packed and aligned attributes generate nice code. > If plain "__long_aligned" works and, since you're tagging it to the structure > definition, it only specifies a minimum-alignment, then I'm fine with using > that to fix this. I'd prefer to add the "packed" to ensure that gcc never decides for some odd reason to use an alignment larger than the one we specify in the linker script. Thanks, Mathieu -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com