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

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

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

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 size and

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 again and

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 */". > >

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-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 asm/kerneltypes.h for m68k

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 */. We had one

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

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)))

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_u16;

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-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

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 a try:

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 ==

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 == sizeof(type))

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-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 something

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

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 just weird as

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 > > >

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

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 > > ---

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

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

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

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

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

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

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

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

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

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 struct

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)=12 is not a

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 section

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

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 oddly

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 section

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

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 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 some ugly

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 @@ -343,7

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_devicetable.h

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?

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?