Commit cb32898c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Linus Torvalds
Browse files

MN10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macros



Include the linux/page.h header into the MN10300 kernel linker script thus
allowing us to use PAGE_SIZE macro instead of a numeric constant.

Also use the PERCPU macro instead of an explicit section definition.

Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4e6f2ba9
Loading
Loading
Loading
Loading
+10 −12
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#define __VMLINUX_LDS__
#define __VMLINUX_LDS__
#include <asm-generic/vmlinux.lds.h>
#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <asm/thread_info.h>
#include <asm/page.h>


OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
OUTPUT_ARCH(mn10300)
OUTPUT_ARCH(mn10300)
@@ -55,13 +56,13 @@ SECTIONS
	CONSTRUCTORS
	CONSTRUCTORS
	}
	}


  . = ALIGN(4096);
  . = ALIGN(PAGE_SIZE);
  __nosave_begin = .;
  __nosave_begin = .;
  .data_nosave : { *(.data.nosave) }
  .data_nosave : { *(.data.nosave) }
  . = ALIGN(4096);
  . = ALIGN(PAGE_SIZE);
  __nosave_end = .;
  __nosave_end = .;


  . = ALIGN(4096);
  . = ALIGN(PAGE_SIZE);
  .data.page_aligned : { *(.data.idt) }
  .data.page_aligned : { *(.data.idt) }


  . = ALIGN(32);
  . = ALIGN(32);
@@ -78,7 +79,7 @@ SECTIONS
  .data.init_task : { *(.data.init_task) }
  .data.init_task : { *(.data.init_task) }


  /* might get freed after init */
  /* might get freed after init */
  . = ALIGN(4096);
  . = ALIGN(PAGE_SIZE);
  .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
  .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
  	__smp_locks = .;
  	__smp_locks = .;
	*(.smp_locks)
	*(.smp_locks)
@@ -86,7 +87,7 @@ SECTIONS
  }
  }


  /* will be freed after init */
  /* will be freed after init */
  . = ALIGN(4096);		/* Init code and data */
  . = ALIGN(PAGE_SIZE);		/* Init code and data */
  __init_begin = .;
  __init_begin = .;
  .init.text : {
  .init.text : {
	_sinittext = .;
	_sinittext = .;
@@ -120,17 +121,14 @@ SECTIONS
  .exit.data : { *(.exit.data) }
  .exit.data : { *(.exit.data) }


#ifdef CONFIG_BLK_DEV_INITRD
#ifdef CONFIG_BLK_DEV_INITRD
  . = ALIGN(4096);
  . = ALIGN(PAGE_SIZE);
  __initramfs_start = .;
  __initramfs_start = .;
  .init.ramfs : { *(.init.ramfs) }
  .init.ramfs : { *(.init.ramfs) }
  __initramfs_end = .;
  __initramfs_end = .;
#endif
#endif


  . = ALIGN(32);
  PERCPU(32)
  __per_cpu_start = .;
  . = ALIGN(PAGE_SIZE);
  .data.percpu  : { *(.data.percpu) }
  __per_cpu_end = .;
  . = ALIGN(4096);
  __init_end = .;
  __init_end = .;
  /* freed after init ends here */
  /* freed after init ends here */


@@ -145,7 +143,7 @@ SECTIONS
  _end = . ;
  _end = . ;


  /* This is where the kernel creates the early boot page tables */
  /* This is where the kernel creates the early boot page tables */
  . = ALIGN(4096);
  . = ALIGN(PAGE_SIZE);
  pg0 = .;
  pg0 = .;


  /* Sections to be discarded */
  /* Sections to be discarded */