m32r: Cleanup linker script
Hi Linus,
This patchset cleans up the linker script for m32r.
From: Tim Abbott <[email protected]>
This cross-architecture linker script cleanup project is in preparation for adding support for building the kernel with -ffunction-sections -fdata-sections, which is a prerequisite for Ksplice.
Please pull the following updates.
---
The following changes since commit 43c1266ce4dc06bfd236cec31e11e9ecd69c0bef:
Linus Torvalds (1):
Merge branch 'perfcounters-rename-for-linus' of git://git.kernel.org/.../tip/linux-2.6-tip
are available in the git repository at:
git://www.linux-m32r.org/git/takata/linux-2.6_dev.git for-linus
Tim Abbott (6):
m32r: make PAGE_SIZE available to assembly.
m32r: Define THREAD_SIZE only once.
m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
m32r: Remove unused .altinstructions and .exit.* code from linker script.
m32r: Move the spi_stack_top and spu_stack_top into .init.data section.
m32r: Cleanup linker script using new linker script macros.
arch/m32r/include/asm/page.h | 4 +- arch/m32r/include/asm/processor.h | 2 - arch/m32r/include/asm/thread_info.h | 15 +------ arch/m32r/kernel/entry.S | 7 +++ arch/m32r/kernel/head.S | 4 +- arch/m32r/kernel/vmlinux.lds.S | 78 ++++------------------------------- 6 files changed, 23 insertions(+), 87 deletions(-)
---
commit 85233c43f7fece10a3ea8ed34f0d546b8dd3a435
Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:49 2009 -0400
m32r: Cleanup linker script using new linker script macros.
This patch is largely a straightforward conversion. One thing to note is that the new macros use fewer separate output sections than the old code; this should have no functional impact but is relevant for people objdumping vmlinux files.
Also note that it moves the .data.init_task output sections inside _edata.
commit 743486dff1d03eb4a67bd75402699629f70cd5b4
Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:48 2009 -0400
m32r: Move the spi_stack_top and spu_stack_top into .init.data section.
Since these get squashed into the .data output section by the m32r linker script, it seems likely that they don't need their own input sections.
At Hirokazu Takata's suggestion, we place these structures in .init.data rather than just placing them in .data (since they are only used at init time).
This patch is preparation for cleaning up the m32r architecture to use the new macros in vmlinux.lds.h; if these sections are indeed not needed, then we can use the RW_DATA_SECTION macro for m32r and save a bunch of redundant code.
commit 2a67d26284c31e676bcf3891ad8cee75e87fbada
Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:47 2009 -0400
m32r: Remove unused .altinstructions and .exit.* code from linker script.
It appears that m32r copied the .altinstructions definition from x86 when the architecture was first merged into Linux. m32r doesn't put anything in .altinstructions, so this is just dead code.
The following block affecting .exit.text/.exit.data, which has a comment also copied from x86, should also be deleted; the linker script later discards the .exit.text and .exit.data sections.
commit 00b01b246bc2e28763cbd85f0dc949d6c0d38c13
Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:46 2009 -0400
m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
Previously, asm/thread_info.h was not usable from linker scripts because it contains a piece of .macro code. Since that code was only used in the m32r entry.S, the right fix is probably to move the macro there.
commit a7efb879ab5b07726873ace8305373bdf68be8a8
Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:45 2009 -0400
m32r: Define THREAD_SIZE only once.
Previously, m32r's asm/thread_info.h defined THREAD_SIZE differently for assembly and C code; now that PAGE_SIZE is usable from assembly, these can be combined. Also, m32r's asm/processor.h redefines THREAD_SIZE to the same value; remove this redundant definition.
commit 8b1c9befbfbd443bd95e77db01c70f1741aa2511
Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:44 2009 -0400
m32r: make PAGE_SIZE available to assembly.
page.h includes ifndef __ASSEMBLY__ guards, but PAGE_SIZE is defined using "1UL", which the assembler does not support. Use the _AC macro
from const.h to make it available to assembly (and linker scripts).
--
Hirokazu Takata <[email protected]>
Linux/M32R Project: http://www.linux-m32r.org/
Hi, Linus,
Sorry, there was a cross in the post.
I was not conscious of Sam's acknowledgement mail. And a newer patchset has been sent by Tim Abbott on Sep. 22, 2009 - 10:23:21 EST.
Quoted 1 line
[PATCH 00/13] Linker script cleanup patches for various architectures
The newer patchset includes updates for not only m32r but also parisc, xtenza, h8300, mn10300 and um.
What do I deal with such a cross architectural patchset?
-- Takata
At Wed, 23 Sep 2009 02:55:19 +0900,
Quoted 141 lines · Hirokazu Takata
Hi Linus,
This patchset cleans up the linker script for m32r.
From: Tim Abbott <[email protected]>
This cross-architecture linker script cleanup project is in preparation for adding support for building the kernel with -ffunction-sections -fdata-sections, which is a prerequisite for Ksplice.
Please pull the following updates.
---
The following changes since commit43c1266ce4dc06bfd236cec31e11e9ecd69c0bef:
Linus Torvalds (1):
Merge branch 'perfcounters-rename-for-linus' ofgit://git.kernel.org/.../tip/linux-2.6-tipare available in the git repository at:
git://www.linux-m32r.org/git/takata/linux-2.6_dev.gitfor-linusTim Abbott (6):
m32r: makePAGE_SIZEavailable to assembly.
m32r: DefineTHREAD_SIZEonly once.
m32r: MoveGET_THREAD_INFOdefinition out ofasm/thread_info.h.
m32r: Remove unused .altinstructions and .exit.* code from linker script.
m32r: Move thespi_stack_topandspu_stack_topinto .init.data section.
m32r: Cleanup linker script using new linker script macros.arch/m32r/include/asm/page.h | 4 +- arch/m32r/include/asm/processor.h | 2 - arch/m32r/include/asm/thread_info.h | 15 +------ arch/m32r/kernel/entry.S | 7 +++ arch/m32r/kernel/head.S | 4 +- arch/m32r/kernel/vmlinux.lds.S | 78 ++++------------------------------- 6 files changed, 23 insertions(+), 87 deletions(-)---
commit85233c43f7fece10a3ea8ed34f0d546b8dd3a435Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:49 2009 -0400m32r: Cleanup linker script using new linker script macros.
This patch is largely a straightforward conversion. One thing to note is that the new macros use fewer separate output sections than the old code; this should have no functional impact but is relevant for people objdumping vmlinux files.
Also note that it moves the .data.init_task output sections inside
_edata.Signed-off-by Tim Abbott <[email protected]>Signed-off-by Hirokazu Takata <[email protected]>commit
743486dff1d03eb4a67bd75402699629f70cd5b4Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:48 2009 -0400m32r: Move the
spi_stack_topandspu_stack_topinto .init.data section.Since these get squashed into the .data output section by the m32r linker script, it seems likely that they don't need their own input sections.
At Hirokazu Takata's suggestion, we place these structures in .init.data rather than just placing them in .data (since they are only used at init time).
This patch is preparation for cleaning up the m32r architecture to use the new macros in
vmlinux.lds.h; if these sections are indeed not needed, then we can use theRW_DATA_SECTIONmacro for m32r and save a bunch of redundant code.Signed-off-by Tim Abbott <[email protected]>Signed-off-by Hirokazu Takata <[email protected]>commit
2a67d26284c31e676bcf3891ad8cee75e87fbadaAuthor: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:47 2009 -0400m32r: Remove unused .altinstructions and .exit.* code from linker script.
It appears that m32r copied the .altinstructions definition from x86 when the architecture was first merged into Linux. m32r doesn't put anything in .altinstructions, so this is just dead code.
The following block affecting .exit.text/.exit.data, which has a comment also copied from x86, should also be deleted; the linker script later discards the .exit.text and .exit.data sections.
Signed-off-by Tim Abbott <[email protected]>Signed-off-by Hirokazu Takata <[email protected]>commit
00b01b246bc2e28763cbd85f0dc949d6c0d38c13Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:46 2009 -0400m32r: Move
GET_THREAD_INFOdefinition out ofasm/thread_info.h.Previously,
asm/thread_info.hwas not usable from linker scripts because it contains a piece of .macro code. Since that code was only used in the m32rentry.S, the right fix is probably to move the macro there.Signed-off-by Tim Abbott <[email protected]>Signed-off-by Hirokazu Takata <[email protected]>commit
a7efb879ab5b07726873ace8305373bdf68be8a8Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:45 2009 -0400m32r: Define
THREAD_SIZEonly once.Previously, m32r's
asm/thread_info.hdefinedTHREAD_SIZEdifferently for assembly and C code; now thatPAGE_SIZEis usable from assembly, these can be combined. Also, m32r'sasm/processor.hredefinesTHREAD_SIZEto the same value; remove this redundant definition.Signed-off-by Tim Abbott <[email protected]>Signed-off-by Hirokazu Takata <[email protected]>commit
8b1c9befbfbd443bd95e77db01c70f1741aa2511Author: Tim Abbott <[email protected]> Date: Fri Sep 18 16:32:44 2009 -0400m32r: make
PAGE_SIZEavailable to assembly.
page.hincludes ifndef__ASSEMBLY__guards, butPAGE_SIZEis defined using "1UL", which the assembler does not support. Use the_ACmacro
fromconst.hto make it available to assembly (and linker scripts).Signed-off-by Tim Abbott <[email protected]>Signed-off-by Hirokazu Takata <[email protected]>--
Hirokazu Takata <[email protected]>
Linux/M32R Project: http://www.linux-m32r.org/
Quoted 7 lines · Hirokazu Takata
Hi, Linus,
Sorry, there was a cross in the post.
I was not conscious of Sam's acknowledgement mail. And a newer patchset has been sent by Tim Abbott on Sep. 22, 2009 - 10:23:21 EST.
Quoted 6 lines
Quoted 1 line
[PATCH 00/13] Linker script cleanup patches for various architectures
The newer patchset includes updates for not only m32r but also parisc, xtenza, h8300, mn10300 and um.
What do I deal with such a cross architectural patchset?
Sorry for the miscommunication.
My patchset is just 5 orthogonal patchsets included together; there's no dependence between the various architectures. These were just the subset of the architecture linker script cleanups that were ready to be merged at that time.
The 6 m32r patches I sent to Linus are exactly the same as what's in your pull request, so it doesn't matter which one gets merged.
-Tim Abbott
Quoted 13 lines · Tim Abbott
Quoted 11 lines · Hirokazu Takata
Hi, Linus,
Sorry, there was a cross in the post.
I was not conscious of Sam's acknowledgement mail. And a newer patchset has been sent by Tim Abbott on Sep. 22, 2009 - 10:23:21 EST.
Quoted 1 line
[PATCH 00/13] Linker script cleanup patches for various architectures
The newer patchset includes updates for not only m32r but also parisc, xtenza, h8300, mn10300 and um.
...
Quoted 2 lines
The 6 m32r patches I sent to Linus are exactly the same as what's in your pull request, so it doesn't matter which one gets merged.
Since I'm resending that patch series to Linus for other reasons today, I'm going to drop the m32r patches from it (so Linus should merge these m32r linker script cleanups from the pull request).
Sorry again for the confusion.
Best regards,
-Tim Abbott
At Thu, 24 Sep 2009 10:27:06 -0400 (EDT),
Quoted 20 lines · Tim Abbott
Quoted 13 lines · Tim Abbott
Quoted 11 lines · Hirokazu Takata
Hi, Linus,
Sorry, there was a cross in the post.
I was not conscious of Sam's acknowledgement mail. And a newer patchset has been sent by Tim Abbott on Sep. 22, 2009 - 10:23:21 EST.
Quoted 1 line
[PATCH 00/13] Linker script cleanup patches for various architectures
The newer patchset includes updates for not only m32r but also parisc, xtenza, h8300, mn10300 and um.
...
Quoted 2 lines
The 6 m32r patches I sent to Linus are exactly the same as what's in your pull request, so it doesn't matter which one gets merged.
Quoted 9 lines
Since I'm resending that patch series to Linus for other reasons today, I'm going to drop the m32r patches from it (so Linus should merge these m32r linker script cleanups from the pull request).
Sorry again for the confusion.
Best regards,
-Tim Abbott
Thank you very much for your additional effort.
I will send a updated pull request for m32r to Linus again.
Best regards,
-- Takata