LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: gorcunov@gmail.com
To: rth@twiddle.net, chris@zankel.net, jdike@addtoit.com,
	linuxppc-dev@ozlabs.org, paulus@samba.org, dhowells@redhat.com,
	zippel@linux-m68k.org, geert@linux-m68k.org,
	linux-m68k@vger.kernel.org, takata@linux-m32r.org,
	linux-m32r@ml.linux-m32r.org, linux-kernel@vger.kernel.org
Cc: gorcunov@gmail.com, sam@ravnborg.org
Subject: [RFC 05/10] mn10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macroses
Date: Wed, 27 Feb 2008 23:58:36 +0300	[thread overview]
Message-ID: <20080227210003.484325295@gmail.com> (raw)
In-Reply-To: <20080227205831.150784453@gmail.com>

[-- Attachment #1: mn10300-vmlinux --]
[-- Type: text/plain, Size: 2365 bytes --]

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 <gorcunov@gmail.com>
---

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
===================================================================
--- linux-2.6.git.orig/arch/mn10300/kernel/vmlinux.lds.S	2008-02-21 22:26:02.000000000 +0300
+++ linux-2.6.git/arch/mn10300/kernel/vmlinux.lds.S	2008-02-27 21:30:34.000000000 +0300
@@ -11,6 +11,7 @@
 #define __VMLINUX_LDS__
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/thread_info.h>
+#include <asm/page.h>
 
 OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
 OUTPUT_ARCH(mn10300)
@@ -55,13 +56,13 @@ SECTIONS
 	CONSTRUCTORS
 	}
 
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __nosave_begin = .;
   .data_nosave : { *(.data.nosave) }
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __nosave_end = .;
 
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   .data.page_aligned : { *(.data.idt) }
 
   . = ALIGN(32);
@@ -78,7 +79,7 @@ SECTIONS
   .data.init_task : { *(.data.init_task) }
 
   /* might get freed after init */
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
   	__smp_locks = .;
 	*(.smp_locks)
@@ -86,7 +87,7 @@ SECTIONS
   }
 
   /* will be freed after init */
-  . = ALIGN(4096);		/* Init code and data */
+  . = ALIGN(PAGE_SIZE);		/* Init code and data */
   __init_begin = .;
   .init.text : {
 	_sinittext = .;
@@ -120,17 +121,14 @@ SECTIONS
   .exit.data : { *(.exit.data) }
 
 #ifdef CONFIG_BLK_DEV_INITRD
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
 #endif
 
-  . = ALIGN(32);
-  __per_cpu_start = .;
-  .data.percpu  : { *(.data.percpu) }
-  __per_cpu_end = .;
-  . = ALIGN(4096);
+  PERCPU(32)
+  . = ALIGN(PAGE_SIZE);
   __init_end = .;
   /* freed after init ends here */
 
@@ -145,7 +143,7 @@ SECTIONS
   _end = . ;
 
   /* This is where the kernel creates the early boot page tables */
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   pg0 = .;
 
   /* Sections to be discarded */

-- 

  parent reply	other threads:[~2008-02-27 21:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27 20:58 [RFC 00/10] vmlinux.lds cleanup gorcunov
2008-02-27 20:58 ` [RFC 01/10] arm: vmlinux.lds.S cleanup - use PERCPU, PAGE_SIZE macroses gorcunov
2008-02-27 20:58 ` [RFC 02/10] m32r: vmlinux.lds.S cleanup - use PAGE_SIZE, THREAD_SIZE macroses gorcunov
2008-02-27 20:58 ` [RFC 03/10] m68k: vmlinux-std/sun3.lds.S cleanup - use PAGE_SIZE macro gorcunov
2008-02-28  8:56   ` Geert Uytterhoeven
2008-02-27 20:58 ` [RFC 04/10] m68knommu: vmlinux.lds " gorcunov
2008-02-27 20:58 ` gorcunov [this message]
2008-02-27 20:58 ` [RFC 06/10] powerpc: vmlinux.lds.S cleanup - use PERCPU, THREAD_SIZE macroses gorcunov
2008-02-27 20:58 ` [RFC 07/10] ppc: vmlinux.lds.S cleanup - use PAGE_SIZE macro gorcunov
2008-02-27 20:58 ` [RFC 08/10] um: dyn/uml.lds.S " gorcunov
2008-02-29 15:43   ` Jeff Dike
2008-03-01 15:35     ` Cyrill Gorcunov
2008-02-27 20:58 ` [RFC 09/10] alpha: vmlinux.lds cleanup - use THREAD_SIZE macro gorcunov
2008-02-27 20:58 ` [RFC 10/10] xtensa: vmlinux.lds.S - use PAGE_SIZE, THREAD_SIZE macroses gorcunov
2008-02-28 12:50 ` [RFC 05/10] mn10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macroses David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080227210003.484325295@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=chris@zankel.net \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m32r@ml.linux-m32r.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=rth@twiddle.net \
    --cc=sam@ravnborg.org \
    --cc=takata@linux-m32r.org \
    --cc=zippel@linux-m68k.org \
    --subject='Re: [RFC 05/10] mn10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macroses' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).