Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-11 Thread Rusty Russell
On Sunday 09 December 2007 08:58:11 Adrian Bunk wrote: > On Mon, Dec 03, 2007 at 09:02:19PM +1100, Rusty Russell wrote: > > On Sunday 02 December 2007 22:22:31 Geert Uytterhoeven wrote: > > > On Sat, 1 Dec 2007, Pierre Ossman wrote: > > > > Yeah, that could work. Have a header with stuff like this:

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-10 Thread Pierre Ossman
On Mon, 10 Dec 2007 19:11:12 +0100 Adrian Bunk <[EMAIL PROTECTED]> wrote: > On Sun, Dec 09, 2007 at 06:08:18PM +0100, Pierre Ossman wrote: > > > > This still requires a bit of maintenance to set up a kerneltypes.h for > > every arch. > > Better doing this work once than fixing similar issues ag

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-10 Thread Adrian Bunk
On Sun, Dec 09, 2007 at 06:08:18PM +0100, Pierre Ossman wrote: > On Sun, 2 Dec 2007 12:22:31 +0100 (CET) > Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > > > > I gave it a try: > > - Remove existing alignment attributes from some device_id types > > - Introduce kernel_* types with proper s

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-09 Thread Pierre Ossman
On Sat, 8 Dec 2007 22:58:11 +0100 Adrian Bunk <[EMAIL PROTECTED]> wrote: > On Mon, Dec 03, 2007 at 09:02:19PM +1100, Rusty Russell wrote: > > So, just insert two bits of padding in sdio_device_id and insert a comment > > saying "/* Explicit padding: works even if we're cross-compiling */". > > W

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-09 Thread Pierre Ossman
On Sun, 2 Dec 2007 12:22:31 +0100 (CET) Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > I gave it a try: > - Remove existing alignment attributes from some device_id types > - Introduce kernel_* types with proper size and alignment for > cross-compilation (sample for m68k included) >

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-08 Thread Jon Masters
On Sat, 2007-12-08 at 22:58 +0100, Adrian Bunk wrote: > On Mon, Dec 03, 2007 at 09:02:19PM +1100, Rusty Russell wrote: > > On Sunday 02 December 2007 22:22:31 Geert Uytterhoeven wrote: > > > On Sat, 1 Dec 2007, Pierre Ossman wrote: > > > > Yeah, that could work. Have a header with stuff like this:

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-08 Thread Adrian Bunk
On Mon, Dec 03, 2007 at 09:02:19PM +1100, Rusty Russell wrote: > On Sunday 02 December 2007 22:22:31 Geert Uytterhoeven wrote: > > On Sat, 1 Dec 2007, Pierre Ossman wrote: > > > Yeah, that could work. Have a header with stuff like this: > > > > > > typedef u16 __attribute__((aligned(2))) aligned_u1

Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-03 Thread Rusty Russell
On Sunday 02 December 2007 22:22:31 Geert Uytterhoeven wrote: > On Sat, 1 Dec 2007, Pierre Ossman wrote: > > Yeah, that could work. Have a header with stuff like this: > > > > typedef u16 __attribute__((aligned(2))) aligned_u16; > > typedef u32 __attribute__((aligned(4))) aligned_u32; > > I gave it

Correct types for mod_devicetable.h (was: Re: m68k build failure)

2007-12-02 Thread Geert Uytterhoeven
On Sat, 1 Dec 2007, Pierre Ossman wrote: > On Wed, 28 Nov 2007 13:34:02 +0100 (CET) > Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > > On Wed, 28 Nov 2007, Pierre Ossman wrote: > > > > > > Is there no directive we can stick in there that forces a reasonable > > > alignment (e.g. alignment ==

Re: m68k build failure

2007-12-01 Thread Pierre Ossman
On Wed, 28 Nov 2007 13:34:02 +0100 (CET) Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > On Wed, 28 Nov 2007, Pierre Ossman wrote: > > > > Is there no directive we can stick in there that forces a reasonable > > alignment (e.g. alignment == sizeof(type)) independently of arch? > > We could use

Re: m68k build failure

2007-11-30 Thread Adrian Bunk
On Thu, Nov 29, 2007 at 01:19:42PM -0800, Andrew Morton wrote: > On Wed, 28 Nov 2007 09:28:56 + > Al Viro <[EMAIL PROTECTED]> wrote: > > > On Wed, Nov 28, 2007 at 01:00:56AM -0800, Andrew Morton wrote: > > > > No the slightest. 12 seems like the correct, padded size. A size of 10 > > > > is j

Re: m68k build failure

2007-11-29 Thread Andrew Morton
On Wed, 28 Nov 2007 09:28:56 + Al Viro <[EMAIL PROTECTED]> wrote: > On Wed, Nov 28, 2007 at 01:00:56AM -0800, Andrew Morton wrote: > > > No the slightest. 12 seems like the correct, padded size. A size of 10 is > > > just weird as the unpadded size is 9 bytes. Could you dump the > > > __mod_

Re: m68k build failure

2007-11-28 Thread Geert Uytterhoeven
On Wed, 28 Nov 2007, Pierre Ossman wrote: > On Wed, 28 Nov 2007 09:28:56 + > Al Viro <[EMAIL PROTECTED]> wrote: > > > > Eh... m68k has 16bit alignment for unsigned long. > > > > diff --git a/include/linux/mod_devicetable.h > > b/include/linux/mod_devicetable.h > > --- a/include/linux/mod_

Re: m68k build failure

2007-11-28 Thread Pierre Ossman
On Wed, 28 Nov 2007 09:28:56 + Al Viro <[EMAIL PROTECTED]> wrote: > > Eh... m68k has 16bit alignment for unsigned long. > > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -

Re: m68k build failure

2007-11-28 Thread Andreas Schwab
Alan Cox <[EMAIL PROTECTED]> writes: >> Delightful. So what are the options here? Start packing the device table >> structs is the obvious quick fix. Declaring cross-compilation unsupported >> isn't really viable, and I guess determining padding differences is far from >> easy. > > There are so

Re: m68k build failure

2007-11-28 Thread Alan Cox
> Delightful. So what are the options here? Start packing the device table > structs is the obvious quick fix. Declaring cross-compilation unsupported > isn't really viable, and I guess determining padding differences is far from > easy. There are some ugly options: Cross compile a test object

Re: m68k build failure

2007-11-28 Thread Pierre Ossman
On Wed, 28 Nov 2007 10:27:18 +0100 (CET) Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > So the problem is in scripts/mod/file2alias.c, which gives a different > sizeof(struct sdio_device_id) on the cross-compile host: > - sizeof(struct sdio_device_id) = 12 on ia32 > - sizeof(struct sdio_de

Re: m68k build failure

2007-11-28 Thread Andreas Schwab
Pierre Ossman <[EMAIL PROTECTED]> writes: > On Tue, 27 Nov 2007 22:07:23 -0800 > Andrew Morton <[EMAIL PROTECTED]> wrote: > >> >> Current Linus tree give me this, with m68k allmodconfig: >> >> FATAL: drivers/bluetooth/btsdio: sizeof(struct sdio_device_id)=12 is not a >> modulo of the size of se

Re: m68k build failure

2007-11-28 Thread Al Viro
On Wed, Nov 28, 2007 at 01:00:56AM -0800, Andrew Morton wrote: > > No the slightest. 12 seems like the correct, padded size. A size of 10 is > > just weird as the unpadded size is 9 bytes. Could you dump the > > __mod_sdio_device_table section so we can determine if it is cropped or > > just odd

Re: m68k build failure

2007-11-28 Thread Geert Uytterhoeven
On Wed, 28 Nov 2007, Geert Uytterhoeven wrote: > On Wed, 28 Nov 2007, Pierre Ossman wrote: > > On Tue, 27 Nov 2007 22:07:23 -0800 > > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > Current Linus tree give me this, with m68k allmodconfig: > > > > > > FATAL: drivers/bluetooth/btsdio: sizeof(struct s

Re: m68k build failure

2007-11-28 Thread Geert Uytterhoeven
On Wed, 28 Nov 2007, Pierre Ossman wrote: > On Tue, 27 Nov 2007 22:07:23 -0800 > Andrew Morton <[EMAIL PROTECTED]> wrote: > > Current Linus tree give me this, with m68k allmodconfig: > > > > FATAL: drivers/bluetooth/btsdio: sizeof(struct sdio_device_id)=12 is not a > > modulo of the size of secti

Re: m68k build failure

2007-11-28 Thread Andrew Morton
On Wed, 28 Nov 2007 09:48:56 +0100 Pierre Ossman <[EMAIL PROTECTED]> wrote: > On Tue, 27 Nov 2007 22:07:23 -0800 > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > > Current Linus tree give me this, with m68k allmodconfig: > > > > FATAL: drivers/bluetooth/btsdio: sizeof(struct sdio_device_id)=1

Re: m68k build failure

2007-11-28 Thread Pierre Ossman
On Tue, 27 Nov 2007 22:07:23 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote: > > Current Linus tree give me this, with m68k allmodconfig: > > FATAL: drivers/bluetooth/btsdio: sizeof(struct sdio_device_id)=12 is not a > modulo of the size of section __mod_sdio_device_table=30. > Fix definition of

m68k build failure

2007-11-27 Thread Andrew Morton
Current Linus tree give me this, with m68k allmodconfig: FATAL: drivers/bluetooth/btsdio: sizeof(struct sdio_device_id)=12 is not a modulo of the size of section __mod_sdio_device_table=30. Fix definition of struct sdio_device_id in mod_devicetable.h which I haven't seen before. Any ideas? Th