Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761985AbYBRXRs (ORCPT ); Mon, 18 Feb 2008 18:17:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753831AbYBRXRk (ORCPT ); Mon, 18 Feb 2008 18:17:40 -0500 Received: from vs166246.vserver.de ([62.75.166.246]:55974 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753643AbYBRXRk (ORCPT ); Mon, 18 Feb 2008 18:17:40 -0500 From: Michael Buesch To: Russell King Subject: Re: [RFC] [PATCH] Fix b43 driver build for arm Date: Tue, 19 Feb 2008 00:17:04 +0100 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: Gordon Farquharson , linux-kernel@vger.kernel.org, linville@tuxdriver.com, stefano.brivio@polimi.it References: <97a0a9ac0802181403ja79c32v864b093414b2755@mail.gmail.com> <20080218225354.GE23181@flint.arm.linux.org.uk> <20080218230058.GA32357@flint.arm.linux.org.uk> In-Reply-To: <20080218230058.GA32357@flint.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200802190017.04432.mb@bu3sch.de> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1550 Lines: 47 On Tuesday 19 February 2008 00:00:58 Russell King wrote: > > > Why can't we have an array of this structure on ARM? > > > > > > struct ssb_device_id { > > > __u16 vendor; > > > > 2 bytes > > > > > __u16 coreid; > > > > 2 bytes > > > > > __u8 revision; > > > > 1 byte > > > > > }; > > > > and therefore sizeof this structure will be 5 bytes, but because of the > > ABI rules (which are _explicitly_ allowed by the C standard), it'll > > become 8 bytes due to padding afterwards. > > Another guess might be that, if using AEABI, this structure might > be 6 bytes in size, but the linker will align structures to 4 bytes. If the struct is padded to 6 bytes and the linker aligns it to 4 byte everything will be naturally aligned, as far as I can see. > FATAL: drivers/net/wireless/b43/b43: sizeof(struct ssb_device_id)=6 is > not a modulo of the size of section __mod_ssb_device_table=64. > Fix definition of struct ssb_device_id in mod_devicetable.h So this message tells me the table size is 64 bytes. There are 8 entries, so it seems the structure is padded to 8 bytes. But above that it says that sizeof(struct ssb_device_id)=6 IMO this sanity check is broken and not the code. Where does this sanity check message come from? The linker? -- Greetings Michael. -- 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/