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: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Cyrill Gorcunov and committed by Linus Torvalds cb32898c 4e6f2ba9

+10 -12
+10 -12
arch/mn10300/kernel/vmlinux.lds.S
··· 11 #define __VMLINUX_LDS__ 12 #include <asm-generic/vmlinux.lds.h> 13 #include <asm/thread_info.h> 14 15 OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") 16 OUTPUT_ARCH(mn10300) ··· 56 CONSTRUCTORS 57 } 58 59 - . = ALIGN(4096); 60 __nosave_begin = .; 61 .data_nosave : { *(.data.nosave) } 62 - . = ALIGN(4096); 63 __nosave_end = .; 64 65 - . = ALIGN(4096); 66 .data.page_aligned : { *(.data.idt) } 67 68 . = ALIGN(32); ··· 79 .data.init_task : { *(.data.init_task) } 80 81 /* might get freed after init */ 82 - . = ALIGN(4096); 83 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 84 __smp_locks = .; 85 *(.smp_locks) ··· 87 } 88 89 /* will be freed after init */ 90 - . = ALIGN(4096); /* Init code and data */ 91 __init_begin = .; 92 .init.text : { 93 _sinittext = .; ··· 121 .exit.data : { *(.exit.data) } 122 123 #ifdef CONFIG_BLK_DEV_INITRD 124 - . = ALIGN(4096); 125 __initramfs_start = .; 126 .init.ramfs : { *(.init.ramfs) } 127 __initramfs_end = .; 128 #endif 129 130 - . = ALIGN(32); 131 - __per_cpu_start = .; 132 - .data.percpu : { *(.data.percpu) } 133 - __per_cpu_end = .; 134 - . = ALIGN(4096); 135 __init_end = .; 136 /* freed after init ends here */ 137 ··· 143 _end = . ; 144 145 /* This is where the kernel creates the early boot page tables */ 146 - . = ALIGN(4096); 147 pg0 = .; 148 149 /* Sections to be discarded */
··· 11 #define __VMLINUX_LDS__ 12 #include <asm-generic/vmlinux.lds.h> 13 #include <asm/thread_info.h> 14 + #include <asm/page.h> 15 16 OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") 17 OUTPUT_ARCH(mn10300) ··· 55 CONSTRUCTORS 56 } 57 58 + . = ALIGN(PAGE_SIZE); 59 __nosave_begin = .; 60 .data_nosave : { *(.data.nosave) } 61 + . = ALIGN(PAGE_SIZE); 62 __nosave_end = .; 63 64 + . = ALIGN(PAGE_SIZE); 65 .data.page_aligned : { *(.data.idt) } 66 67 . = ALIGN(32); ··· 78 .data.init_task : { *(.data.init_task) } 79 80 /* might get freed after init */ 81 + . = ALIGN(PAGE_SIZE); 82 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 83 __smp_locks = .; 84 *(.smp_locks) ··· 86 } 87 88 /* will be freed after init */ 89 + . = ALIGN(PAGE_SIZE); /* Init code and data */ 90 __init_begin = .; 91 .init.text : { 92 _sinittext = .; ··· 120 .exit.data : { *(.exit.data) } 121 122 #ifdef CONFIG_BLK_DEV_INITRD 123 + . = ALIGN(PAGE_SIZE); 124 __initramfs_start = .; 125 .init.ramfs : { *(.init.ramfs) } 126 __initramfs_end = .; 127 #endif 128 129 + PERCPU(32) 130 + . = ALIGN(PAGE_SIZE); 131 __init_end = .; 132 /* freed after init ends here */ 133 ··· 145 _end = . ; 146 147 /* This is where the kernel creates the early boot page tables */ 148 + . = ALIGN(PAGE_SIZE); 149 pg0 = .; 150 151 /* Sections to be discarded */