Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-22 Thread Russell King
On Tue, Jan 22, 2008 at 01:17:15PM -0800, Greg KH wrote:
> I like this a lot.  It makes things much more understandable from a
> driver developer's point of view, and would allow us to mark some things
> as freeable when we do not run with a CPU hotplug system :)

You mean at run time - I'm not sure if there's any advantage to that.

In order to free the hotplug cpu data and text, you'd have to make
those sections page aligned - and then you have the question of
how much space you are wasting in doing so.  That will be variable
over time as the code changes.

Also, if you were to merge the hotplug cpu text and data to reduce
the wastage, would that cause any architectures any issues?  (Thinking
about execute-only being set on the kernel's text section only, etc.)

-- 
Russell King
 Linux kernel2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-22 Thread Greg KH
On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
> Introducing separate sections for __dev* (HOTPLUG),
> __cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG)
> allows us to do a much more reliable Section mismatch
> check in modpost. We are no longer dependent on the actual
> configuration of for example HOTPLUG.
> 
> This has the effect that all users see much more
> Section mismatch warnings than before because they
> were almost all hidden when HOTPLUG was enabled.
> The advantage of this is that when building a piece
> of code then it is much more likely that the Section
> mismatch errors are spotted and the warnings will be
> felt less random of nature.
> 
> Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
> Cc: Greg KH <[EMAIL PROTECTED]>
> Cc: Randy Dunlap <[EMAIL PROTECTED]>
> Cc: Adrian Bunk <[EMAIL PROTECTED]>

I like this a lot.  It makes things much more understandable from a
driver developer's point of view, and would allow us to mark some things
as freeable when we do not run with a CPU hotplug system :)

Feel free to add a:
Acked-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
to the patch, if you want to take it in your tree.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-22 Thread Greg KH
On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
 Introducing separate sections for __dev* (HOTPLUG),
 __cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG)
 allows us to do a much more reliable Section mismatch
 check in modpost. We are no longer dependent on the actual
 configuration of for example HOTPLUG.
 
 This has the effect that all users see much more
 Section mismatch warnings than before because they
 were almost all hidden when HOTPLUG was enabled.
 The advantage of this is that when building a piece
 of code then it is much more likely that the Section
 mismatch errors are spotted and the warnings will be
 felt less random of nature.
 
 Signed-off-by: Sam Ravnborg [EMAIL PROTECTED]
 Cc: Greg KH [EMAIL PROTECTED]
 Cc: Randy Dunlap [EMAIL PROTECTED]
 Cc: Adrian Bunk [EMAIL PROTECTED]

I like this a lot.  It makes things much more understandable from a
driver developer's point of view, and would allow us to mark some things
as freeable when we do not run with a CPU hotplug system :)

Feel free to add a:
Acked-by: Greg Kroah-Hartman [EMAIL PROTECTED]
to the patch, if you want to take it in your tree.

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-22 Thread Russell King
On Tue, Jan 22, 2008 at 01:17:15PM -0800, Greg KH wrote:
 I like this a lot.  It makes things much more understandable from a
 driver developer's point of view, and would allow us to mark some things
 as freeable when we do not run with a CPU hotplug system :)

You mean at run time - I'm not sure if there's any advantage to that.

In order to free the hotplug cpu data and text, you'd have to make
those sections page aligned - and then you have the question of
how much space you are wasting in doing so.  That will be variable
over time as the code changes.

Also, if you were to merge the hotplug cpu text and data to reduce
the wastage, would that cause any architectures any issues?  (Thinking
about execute-only being set on the kernel's text section only, etc.)

-- 
Russell King
 Linux kernel2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Tue, Jan 22, 2008 at 09:56:57AM +0900, Paul Mundt wrote:
> On Mon, Jan 21, 2008 at 01:06:41PM +0100, Sam Ravnborg wrote:
> > On Mon, Jan 21, 2008 at 07:52:57PM +0900, Paul Mundt wrote:
> > > On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
> > > > On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
> > > > > On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
> > > > > > Sam Ravnborg <[EMAIL PROTECTED]> writes:
> > > > > > 
> > > > > > > On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> > > > > > >> so the ## is being taken directly rather than acting as a 
> > > > > > >> concatenation.
> > > > > > >
> > > > > > > Strange...
> > > > > > > I can reproduce with gcc 3.4.5 here - will fix.
> > > > > > 
> > > > > > The ## operator does not work with -traditional.
> > > > > 
> > > > > Crap - then it breaks at the following architectures:
> > > > > sh64, s390, m68k, m32r
> > > > > 
> > > > > Thanks Andreas.
> > > > 
> > > > OK - I was too quick it seem.
> > > > sh has:
> > > > arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
> > > > 
> > > > So this needs to be ripped out as it is not needed.
> > > > 
> > > Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
> > > off in my tree. Otherwise, feel free to roll this in to your patch set.
> > 
> > It is aimed for 2.6.25 and it looks reasonable to reach that goal.
> > So please take this patch in your tree.
> > 
> Done.
Thanks Paul,
and thanks for the prompt testing!

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Paul Mundt
On Mon, Jan 21, 2008 at 01:06:41PM +0100, Sam Ravnborg wrote:
> On Mon, Jan 21, 2008 at 07:52:57PM +0900, Paul Mundt wrote:
> > On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
> > > On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
> > > > On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
> > > > > Sam Ravnborg <[EMAIL PROTECTED]> writes:
> > > > > 
> > > > > > On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> > > > > >> so the ## is being taken directly rather than acting as a 
> > > > > >> concatenation.
> > > > > >
> > > > > > Strange...
> > > > > > I can reproduce with gcc 3.4.5 here - will fix.
> > > > > 
> > > > > The ## operator does not work with -traditional.
> > > > 
> > > > Crap - then it breaks at the following architectures:
> > > > sh64, s390, m68k, m32r
> > > > 
> > > > Thanks Andreas.
> > > 
> > > OK - I was too quick it seem.
> > > sh has:
> > > arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
> > > 
> > > So this needs to be ripped out as it is not needed.
> > > 
> > Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
> > off in my tree. Otherwise, feel free to roll this in to your patch set.
> 
> It is aimed for 2.6.25 and it looks reasonable to reach that goal.
> So please take this patch in your tree.
> 
Done.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 07:52:57PM +0900, Paul Mundt wrote:
> On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
> > On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
> > > On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
> > > > Sam Ravnborg <[EMAIL PROTECTED]> writes:
> > > > 
> > > > > On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> > > > >> so the ## is being taken directly rather than acting as a 
> > > > >> concatenation.
> > > > >
> > > > > Strange...
> > > > > I can reproduce with gcc 3.4.5 here - will fix.
> > > > 
> > > > The ## operator does not work with -traditional.
> > > 
> > > Crap - then it breaks at the following architectures:
> > > sh64, s390, m68k, m32r
> > > 
> > > Thanks Andreas.
> > 
> > OK - I was too quick it seem.
> > sh has:
> > arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
> > 
> > So this needs to be ripped out as it is not needed.
> > 
> Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
> off in my tree. Otherwise, feel free to roll this in to your patch set.

It is aimed for 2.6.25 and it looks reasonable to reach that goal.
So please take this patch in your tree.

Thanks,

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Paul Mundt
On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
> On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
> > On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
> > > Sam Ravnborg <[EMAIL PROTECTED]> writes:
> > > 
> > > > On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> > > >> so the ## is being taken directly rather than acting as a 
> > > >> concatenation.
> > > >
> > > > Strange...
> > > > I can reproduce with gcc 3.4.5 here - will fix.
> > > 
> > > The ## operator does not work with -traditional.
> > 
> > Crap - then it breaks at the following architectures:
> > sh64, s390, m68k, m32r
> > 
> > Thanks Andreas.
> 
> OK - I was too quick it seem.
> sh has:
> arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
> 
> So this needs to be ripped out as it is not needed.
> 
Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
off in my tree. Otherwise, feel free to roll this in to your patch set.

Your kbuild.git works fine with this applied.

Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>

---

diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index e189fae..6a0eb7d 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -151,8 +151,6 @@ drivers-$(CONFIG_OPROFILE)  += arch/sh/oprofile/
 
 boot := arch/sh/boot
 
-CPPFLAGS_vmlinux.lds := -traditional
-
 incdir-prefix  := $(srctree)/include/asm-sh/
 
 #  Update machine arch and proc symlinks if something which affects
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
> On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
> > Sam Ravnborg <[EMAIL PROTECTED]> writes:
> > 
> > > On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> > >> so the ## is being taken directly rather than acting as a concatenation.
> > >
> > > Strange...
> > > I can reproduce with gcc 3.4.5 here - will fix.
> > 
> > The ## operator does not work with -traditional.
> 
> Crap - then it breaks at the following architectures:
> sh64, s390, m68k, m32r
> 
> Thanks Andreas.

OK - I was too quick it seem.
sh has:
arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional

So this needs to be ripped out as it is not needed.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
> Sam Ravnborg <[EMAIL PROTECTED]> writes:
> 
> > On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> >> so the ## is being taken directly rather than acting as a concatenation.
> >
> > Strange...
> > I can reproduce with gcc 3.4.5 here - will fix.
> 
> The ## operator does not work with -traditional.

Crap - then it breaks at the following architectures:
sh64, s390, m68k, m32r

Thanks Andreas.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Andreas Schwab
Sam Ravnborg <[EMAIL PROTECTED]> writes:

> On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
>> so the ## is being taken directly rather than acting as a concatenation.
>
> Strange...
> I can reproduce with gcc 3.4.5 here - will fix.

The ## operator does not work with -traditional.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
> > diff --git a/include/asm-generic/vmlinux.lds.h 
> > b/include/asm-generic/vmlinux.lds.h
> > index ded7ca2..e0a56fb 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -9,10 +9,46 @@
> >  /* Align . to a 8 byte boundary equals to maximum function alignment. */
> >  #define ALIGN_FUNCTION()  . = ALIGN(8)
> >  
> > +/* The actual configuration determine if the init/exit sections
> > + * are handled as text/data or they can be discarded (which
> > + * often happens at runtime)
> > + */
> > +#ifdef CONFIG_HOTPLUG
> > +#define DEV_KEEP(sec)*(.dev##sec)
> > +#define DEV_DISCARD(sec)
> > +#else
> > +#define DEV_KEEP(sec)
> > +#define DEV_DISCARD(sec) *(.dev##sec)
> > +#endif
> > +
> Using your kbuild.git, these blow up for me:
> 
>   LD  .tmp_vmlinux1
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
> in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
> in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
> in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
> in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' 
> in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' 
> in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' 
> in script
> ...
> 
> This comes out as:
> 
> .text : {
> *(.text.head)
> . = ALIGN(8); 
>   *(.text)
> *(.text.init.refok) 
> *(.exit.text.refok) 
> *(.dev##init.text)
> *(.dev##exit.text)
> 
> . = ALIGN(8); 
>   __sched_text_start = .; *(.sched.text)
> __sched_text_end = .;
> . = ALIGN(8); 
>   __lock_text_start = .;  *(.spinlock.text)
> __lock_text_end = .;
> . = ALIGN(8); 
>   __kprobes_text_start = .;   *(.kprobes.text)
> __kprobes_text_end = .;
> *(.fixup)
> *(.gnu.warning)
> ...
> 
> so the ## is being taken directly rather than acting as a concatenation.

Strange...
I can reproduce with gcc 3.4.5 here - will fix.

Setting CONFIG_HOTPLUG=n for sparc64 also cause troubles. Something with local 
symbols discarded.
So more work is needed.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
 On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
  diff --git a/include/asm-generic/vmlinux.lds.h 
  b/include/asm-generic/vmlinux.lds.h
  index ded7ca2..e0a56fb 100644
  --- a/include/asm-generic/vmlinux.lds.h
  +++ b/include/asm-generic/vmlinux.lds.h
  @@ -9,10 +9,46 @@
   /* Align . to a 8 byte boundary equals to maximum function alignment. */
   #define ALIGN_FUNCTION()  . = ALIGN(8)
   
  +/* The actual configuration determine if the init/exit sections
  + * are handled as text/data or they can be discarded (which
  + * often happens at runtime)
  + */
  +#ifdef CONFIG_HOTPLUG
  +#define DEV_KEEP(sec)*(.dev##sec)
  +#define DEV_DISCARD(sec)
  +#else
  +#define DEV_KEEP(sec)
  +#define DEV_DISCARD(sec) *(.dev##sec)
  +#endif
  +
 Using your kbuild.git, these blow up for me:
 
   LD  .tmp_vmlinux1
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
 in script
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
 in script
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
 in script
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' 
 in script
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' 
 in script
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' 
 in script
 sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' 
 in script
 ...
 
 This comes out as:
 
 .text : {
 *(.text.head)
 . = ALIGN(8); 
   *(.text)
 *(.text.init.refok) 
 *(.exit.text.refok) 
 *(.dev##init.text)
 *(.dev##exit.text)
 
 . = ALIGN(8); 
   __sched_text_start = .; *(.sched.text)
 __sched_text_end = .;
 . = ALIGN(8); 
   __lock_text_start = .;  *(.spinlock.text)
 __lock_text_end = .;
 . = ALIGN(8); 
   __kprobes_text_start = .;   *(.kprobes.text)
 __kprobes_text_end = .;
 *(.fixup)
 *(.gnu.warning)
 ...
 
 so the ## is being taken directly rather than acting as a concatenation.

Strange...
I can reproduce with gcc 3.4.5 here - will fix.

Setting CONFIG_HOTPLUG=n for sparc64 also cause troubles. Something with local 
symbols discarded.
So more work is needed.

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Andreas Schwab
Sam Ravnborg [EMAIL PROTECTED] writes:

 On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
 so the ## is being taken directly rather than acting as a concatenation.

 Strange...
 I can reproduce with gcc 3.4.5 here - will fix.

The ## operator does not work with -traditional.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
And now for something completely different.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
 Sam Ravnborg [EMAIL PROTECTED] writes:
 
  On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
  so the ## is being taken directly rather than acting as a concatenation.
 
  Strange...
  I can reproduce with gcc 3.4.5 here - will fix.
 
 The ## operator does not work with -traditional.

Crap - then it breaks at the following architectures:
sh64, s390, m68k, m32r

Thanks Andreas.

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
 On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
  Sam Ravnborg [EMAIL PROTECTED] writes:
  
   On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
   so the ## is being taken directly rather than acting as a concatenation.
  
   Strange...
   I can reproduce with gcc 3.4.5 here - will fix.
  
  The ## operator does not work with -traditional.
 
 Crap - then it breaks at the following architectures:
 sh64, s390, m68k, m32r
 
 Thanks Andreas.

OK - I was too quick it seem.
sh has:
arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional

So this needs to be ripped out as it is not needed.

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Paul Mundt
On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
 On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
  On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
   Sam Ravnborg [EMAIL PROTECTED] writes:
   
On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
so the ## is being taken directly rather than acting as a 
concatenation.
   
Strange...
I can reproduce with gcc 3.4.5 here - will fix.
   
   The ## operator does not work with -traditional.
  
  Crap - then it breaks at the following architectures:
  sh64, s390, m68k, m32r
  
  Thanks Andreas.
 
 OK - I was too quick it seem.
 sh has:
 arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
 
 So this needs to be ripped out as it is not needed.
 
Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
off in my tree. Otherwise, feel free to roll this in to your patch set.

Your kbuild.git works fine with this applied.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]

---

diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index e189fae..6a0eb7d 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -151,8 +151,6 @@ drivers-$(CONFIG_OPROFILE)  += arch/sh/oprofile/
 
 boot := arch/sh/boot
 
-CPPFLAGS_vmlinux.lds := -traditional
-
 incdir-prefix  := $(srctree)/include/asm-sh/
 
 #  Update machine arch and proc symlinks if something which affects
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Mon, Jan 21, 2008 at 07:52:57PM +0900, Paul Mundt wrote:
 On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
  On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
   On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
Sam Ravnborg [EMAIL PROTECTED] writes:

 On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
 so the ## is being taken directly rather than acting as a 
 concatenation.

 Strange...
 I can reproduce with gcc 3.4.5 here - will fix.

The ## operator does not work with -traditional.
   
   Crap - then it breaks at the following architectures:
   sh64, s390, m68k, m32r
   
   Thanks Andreas.
  
  OK - I was too quick it seem.
  sh has:
  arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
  
  So this needs to be ripped out as it is not needed.
  
 Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
 off in my tree. Otherwise, feel free to roll this in to your patch set.

It is aimed for 2.6.25 and it looks reasonable to reach that goal.
So please take this patch in your tree.

Thanks,

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Paul Mundt
On Mon, Jan 21, 2008 at 01:06:41PM +0100, Sam Ravnborg wrote:
 On Mon, Jan 21, 2008 at 07:52:57PM +0900, Paul Mundt wrote:
  On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
   On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
 Sam Ravnborg [EMAIL PROTECTED] writes:
 
  On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
  so the ## is being taken directly rather than acting as a 
  concatenation.
 
  Strange...
  I can reproduce with gcc 3.4.5 here - will fix.
 
 The ## operator does not work with -traditional.

Crap - then it breaks at the following architectures:
sh64, s390, m68k, m32r

Thanks Andreas.
   
   OK - I was too quick it seem.
   sh has:
   arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional
   
   So this needs to be ripped out as it is not needed.
   
  Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
  off in my tree. Otherwise, feel free to roll this in to your patch set.
 
 It is aimed for 2.6.25 and it looks reasonable to reach that goal.
 So please take this patch in your tree.
 
Done.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-21 Thread Sam Ravnborg
On Tue, Jan 22, 2008 at 09:56:57AM +0900, Paul Mundt wrote:
 On Mon, Jan 21, 2008 at 01:06:41PM +0100, Sam Ravnborg wrote:
  On Mon, Jan 21, 2008 at 07:52:57PM +0900, Paul Mundt wrote:
   On Mon, Jan 21, 2008 at 11:47:45AM +0100, Sam Ravnborg wrote:
On Mon, Jan 21, 2008 at 11:45:06AM +0100, Sam Ravnborg wrote:
 On Mon, Jan 21, 2008 at 11:29:52AM +0100, Andreas Schwab wrote:
  Sam Ravnborg [EMAIL PROTECTED] writes:
  
   On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
   so the ## is being taken directly rather than acting as a 
   concatenation.
  
   Strange...
   I can reproduce with gcc 3.4.5 here - will fix.
  
  The ## operator does not work with -traditional.
 
 Crap - then it breaks at the following architectures:
 sh64, s390, m68k, m32r
 
 Thanks Andreas.

OK - I was too quick it seem.
sh has:
arch/sh/Makefile:CPPFLAGS_vmlinux.lds := -traditional

So this needs to be ripped out as it is not needed.

   Yes, that can be killed. If this is aimed at 2.6.25, I'll just kill it
   off in my tree. Otherwise, feel free to roll this in to your patch set.
  
  It is aimed for 2.6.25 and it looks reasonable to reach that goal.
  So please take this patch in your tree.
  
 Done.
Thanks Paul,
and thanks for the prompt testing!

Sam
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-20 Thread Paul Mundt
On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
> diff --git a/include/asm-generic/vmlinux.lds.h 
> b/include/asm-generic/vmlinux.lds.h
> index ded7ca2..e0a56fb 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -9,10 +9,46 @@
>  /* Align . to a 8 byte boundary equals to maximum function alignment. */
>  #define ALIGN_FUNCTION()  . = ALIGN(8)
>  
> +/* The actual configuration determine if the init/exit sections
> + * are handled as text/data or they can be discarded (which
> + * often happens at runtime)
> + */
> +#ifdef CONFIG_HOTPLUG
> +#define DEV_KEEP(sec)*(.dev##sec)
> +#define DEV_DISCARD(sec)
> +#else
> +#define DEV_KEEP(sec)
> +#define DEV_DISCARD(sec) *(.dev##sec)
> +#endif
> +
Using your kbuild.git, these blow up for me:

  LD  .tmp_vmlinux1
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in 
script
...

This comes out as:

.text : {
*(.text.head)
. = ALIGN(8);   
*(.text)
*(.text.init.refok) 
*(.exit.text.refok) 
*(.dev##init.text)
*(.dev##exit.text)

. = ALIGN(8);   
__sched_text_start = .; *(.sched.text)
__sched_text_end = .;
. = ALIGN(8);   
__lock_text_start = .;  *(.spinlock.text)
__lock_text_end = .;
. = ALIGN(8);   
__kprobes_text_start = .;   *(.kprobes.text)
__kprobes_text_end = .;
*(.fixup)
*(.gnu.warning)
...

so the ## is being taken directly rather than acting as a concatenation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

2008-01-20 Thread Paul Mundt
On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
 diff --git a/include/asm-generic/vmlinux.lds.h 
 b/include/asm-generic/vmlinux.lds.h
 index ded7ca2..e0a56fb 100644
 --- a/include/asm-generic/vmlinux.lds.h
 +++ b/include/asm-generic/vmlinux.lds.h
 @@ -9,10 +9,46 @@
  /* Align . to a 8 byte boundary equals to maximum function alignment. */
  #define ALIGN_FUNCTION()  . = ALIGN(8)
  
 +/* The actual configuration determine if the init/exit sections
 + * are handled as text/data or they can be discarded (which
 + * often happens at runtime)
 + */
 +#ifdef CONFIG_HOTPLUG
 +#define DEV_KEEP(sec)*(.dev##sec)
 +#define DEV_DISCARD(sec)
 +#else
 +#define DEV_KEEP(sec)
 +#define DEV_DISCARD(sec) *(.dev##sec)
 +#endif
 +
Using your kbuild.git, these blow up for me:

  LD  .tmp_vmlinux1
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in 
script
sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in 
script
...

This comes out as:

.text : {
*(.text.head)
. = ALIGN(8);   
*(.text)
*(.text.init.refok) 
*(.exit.text.refok) 
*(.dev##init.text)
*(.dev##exit.text)

. = ALIGN(8);   
__sched_text_start = .; *(.sched.text)
__sched_text_end = .;
. = ALIGN(8);   
__lock_text_start = .;  *(.spinlock.text)
__lock_text_end = .;
. = ALIGN(8);   
__kprobes_text_start = .;   *(.kprobes.text)
__kprobes_text_end = .;
*(.fixup)
*(.gnu.warning)
...

so the ## is being taken directly rather than acting as a concatenation.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/