This series of patches is made in purpose to use PAGE_SIZE and THREAD_SIZE
macroses in vmlinux linker scripts as much as possible instead of numeric
constants. Please review.
WARNING: the patches are UNTESTED COMPLETELY - I've no access to
that architectures and errors is highly possible ;)
If you have an ability to test this patches - please do it.
What is most important on review - these macroses *must* be
placed into appropriate places - check it please.
ANY comments are welcome.
- Cyrill -
--
This patch modifies page.h header to be able to include it
into linker script and then we're able to use PAGE_SIZE in
vmlinux.lds
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
arch/m68knommu/kernel/vmlinux.lds.S | 5 +++--
include/asm-m68knommu/page.h | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
Index: linux-2.6.git/arch/m68knommu/kernel/vmlinux.lds.S
===================================================================
This patch modifies PAGE_SIZE definition to be able to
include it into vmlinux.lds.S script and use it then
Also PERCPU macros is used instead of explicit section
declaration
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
arch/arm/kernel/vmlinux.lds.S | 21 ++++++++++-----------
include/asm-arm/page.h | 4 +++-
2 files changed, 13 insertions(+), 12 deletions(-)
Index: linux-2.6.git/arch/arm/kernel/vmlinux.lds.S
===================================================================
@@ -1,6 +1,7 @@ /* ld script to make m68k Linux kernel */ #include <asm-generic/vmlinux.lds.h>+#include <asm/page.h> OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") OUTPUT_ARCH(m68k)
@@ -41,7 +42,7 @@ SECTIONS _edata = .; /* End of data section */ /* will be freed after init */- . = ALIGN(4096); /* Init code and data */+ . = ALIGN(PAGE_SIZE); /* Init code and data */ __init_begin = .; .init.text : { _sinittext = .;
This patch includes thread_info.h header into liker script that
allow us to use THREAD_SIZE macro instead of numeric constant
Also PERCPU macro is used instead of explicit section definition
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
vmlinux.lds.S | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
Index: linux-2.6.git/arch/powerpc/kernel/vmlinux.lds.S
===================================================================
This patch includes page.h header into liker script that
allow us to use PAGE_SIZE macro instead of numeric constant
Also PERCPU macro is used instead of explicit section definition
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
vmlinux.lds.S | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
Index: linux-2.6.git/arch/mn10300/kernel/vmlinux.lds.S
===================================================================
This patch includes page.h header into liker script that
allow us to use PAGE_SIZE macro instead of numeric constant
Also a few tabs deleted to align braces
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
vmlinux.lds.S | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
Index: linux-2.6.git/arch/ppc/kernel/vmlinux.lds.S
===================================================================
This patch includes page.h and thread_info.h headers into the linker
script that allow us to use PAGE_SIZE and THREAD_SIZE macroses
instead of numeric constants
Also a few spaces removed
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
vmlinux.lds.S | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
Index: linux-2.6.git/arch/xtensa/kernel/vmlinux.lds.S
===================================================================
This patch modifies thread_info.h header to be able to include it
into linker script and then we're able to use THREAD_SIZE in
vmlinux.lds
Signed-off-by: Cyrill Gorcunov <redacted>
Reviewed-by: Sam Ravnborg <redacted>
---
arch/alpha/kernel/vmlinux.lds.S | 3 ++-
include/asm-alpha/thread_info.h | 9 ++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
Index: linux-2.6.git/arch/alpha/kernel/vmlinux.lds.S
===================================================================
This patch includes page.h header into liker scripts that
allow us to use PAGE_SIZE macro instead of numeric constant.
To be able to include page.h into linker scripts page.h is
needed for some modification - i.e. we need to use __ASSEMBLY__
and _AC macro
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
arch/um/kernel/dyn.lds.S | 7 ++++---
arch/um/kernel/uml.lds.S | 7 ++++---
include/asm-um/page.h | 17 +++++++++++------
3 files changed, 19 insertions(+), 12 deletions(-)
Index: linux-2.6.git/arch/um/kernel/dyn.lds.S
===================================================================
This patch modifies PAGE_SIZE definition to be able to
include it in vmlinux.lds.S script and use it then
Also THREAD_SIZE macro is used to replace numeric constant
Signed-off-by: Cyrill Gorcunov <redacted>
---
WARNING: COMPLETELY UNTESTED !!!
arch/m32r/kernel/vmlinux.lds.S | 19 ++++++++++---------
include/asm-m32r/page.h | 4 +++-
2 files changed, 13 insertions(+), 10 deletions(-)
Index: linux-2.6.git/arch/m32r/kernel/vmlinux.lds.S
===================================================================
From: David Howells <dhowells@redhat.com> Date: 2008-02-28 12:55:46
gorcunov@gmail.com wrote:
Subject: [RFC 05/10] mn10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macroses
X-RedHat-Spam-Score: -1.005
This patch includes page.h header into liker script that
allow us to use PAGE_SIZE macro instead of numeric constant
Also PERCPU macro is used instead of explicit section definition
Signed-off-by: Cyrill Gorcunov <redacted>
From: Jeff Dike <hidden> Date: 2008-02-29 15:48:30
On Wed, Feb 27, 2008 at 11:58:39PM +0300, gorcunov@gmail.com wrote:
This patch includes page.h header into liker scripts that
allow us to use PAGE_SIZE macro instead of numeric constant.
To be able to include page.h into linker scripts page.h is
needed for some modification - i.e. we need to use __ASSEMBLY__
and _AC macro
Signed-off-by: Cyrill Gorcunov <redacted>
Needed some fixing, but it's OK. I'll forward it on.
Jeff
--
Work email - jdike at linux dot intel dot com
[Jeff Dike - Fri, Feb 29, 2008 at 10:43:03AM -0500]
| On Wed, Feb 27, 2008 at 11:58:39PM +0300, gorcunov@gmail.com wrote:
| > This patch includes page.h header into liker scripts that
| > allow us to use PAGE_SIZE macro instead of numeric constant.
| >
| > To be able to include page.h into linker scripts page.h is
| > needed for some modification - i.e. we need to use __ASSEMBLY__
| > and _AC macro
| >
| > Signed-off-by: Cyrill Gorcunov [off-list ref]
|
| Needed some fixing, but it's OK. I'll forward it on.
|
| Jeff
|
| --
| Work email - jdike at linux dot intel dot com
|
Thank you
- Cyrill -