diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 20:25:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 20:25:09 -0400 |
commit | 851b147e4411df6a1e7e90e2a609773c277eefd2 (patch) | |
tree | 3d3dd17a4e3ff0a6fd0c571d449085d411f7dc17 /arch/m32r/kernel | |
parent | 8e44e4347735229b518cc02938c351428bcd7492 (diff) | |
parent | 85233c43f7fece10a3ea8ed34f0d546b8dd3a435 (diff) |
Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
m32r: Cleanup linker script using new linker script macros.
m32r: Move the spi_stack_top and spu_stack_top into .init.data section.
m32r: Remove unused .altinstructions and .exit.* code from linker script.
m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
m32r: Define THREAD_SIZE only once.
m32r: make PAGE_SIZE available to assembly.
Diffstat (limited to 'arch/m32r/kernel')
-rw-r--r-- | arch/m32r/kernel/entry.S | 7 | ||||
-rw-r--r-- | arch/m32r/kernel/head.S | 4 | ||||
-rw-r--r-- | arch/m32r/kernel/vmlinux.lds.S | 78 |
3 files changed, 18 insertions, 71 deletions
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 612d35b082a6..403869833b98 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
@@ -118,6 +118,13 @@ | |||
118 | #define resume_kernel restore_all | 118 | #define resume_kernel restore_all |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | /* how to get the thread information struct from ASM */ | ||
122 | #define GET_THREAD_INFO(reg) GET_THREAD_INFO reg | ||
123 | .macro GET_THREAD_INFO reg | ||
124 | ldi \reg, #-THREAD_SIZE | ||
125 | and \reg, sp | ||
126 | .endm | ||
127 | |||
121 | ENTRY(ret_from_fork) | 128 | ENTRY(ret_from_fork) |
122 | pop r0 | 129 | pop r0 |
123 | bl schedule_tail | 130 | bl schedule_tail |
diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S index 0a7194439eb1..a46652dd83e6 100644 --- a/arch/m32r/kernel/head.S +++ b/arch/m32r/kernel/head.S | |||
@@ -268,13 +268,13 @@ ENTRY(empty_zero_page) | |||
268 | /*------------------------------------------------------------------------ | 268 | /*------------------------------------------------------------------------ |
269 | * Stack area | 269 | * Stack area |
270 | */ | 270 | */ |
271 | .section .spi | 271 | .section .init.data, "aw" |
272 | ALIGN | 272 | ALIGN |
273 | .global spi_stack_top | 273 | .global spi_stack_top |
274 | .zero 1024 | 274 | .zero 1024 |
275 | spi_stack_top: | 275 | spi_stack_top: |
276 | 276 | ||
277 | .section .spu | 277 | .section .init.data, "aw" |
278 | ALIGN | 278 | ALIGN |
279 | .global spu_stack_top | 279 | .global spu_stack_top |
280 | .zero 1024 | 280 | .zero 1024 |
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index de5e21cca6a5..8ceb6181d805 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <asm-generic/vmlinux.lds.h> | 4 | #include <asm-generic/vmlinux.lds.h> |
5 | #include <asm/addrspace.h> | 5 | #include <asm/addrspace.h> |
6 | #include <asm/page.h> | 6 | #include <asm/page.h> |
7 | #include <asm/thread_info.h> | ||
7 | 8 | ||
8 | OUTPUT_ARCH(m32r) | 9 | OUTPUT_ARCH(m32r) |
9 | #if defined(__LITTLE_ENDIAN__) | 10 | #if defined(__LITTLE_ENDIAN__) |
@@ -40,83 +41,22 @@ SECTIONS | |||
40 | #endif | 41 | #endif |
41 | _etext = .; /* End of text section */ | 42 | _etext = .; /* End of text section */ |
42 | 43 | ||
43 | . = ALIGN(16); /* Exception table */ | 44 | EXCEPTION_TABLE(16) |
44 | __start___ex_table = .; | ||
45 | __ex_table : { *(__ex_table) } | ||
46 | __stop___ex_table = .; | ||
47 | |||
48 | RODATA | 45 | RODATA |
49 | 46 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) | |
50 | /* writeable */ | ||
51 | .data : { /* Data */ | ||
52 | *(.spu) | ||
53 | *(.spi) | ||
54 | DATA_DATA | ||
55 | CONSTRUCTORS | ||
56 | } | ||
57 | |||
58 | . = ALIGN(4096); | ||
59 | __nosave_begin = .; | ||
60 | .data_nosave : { *(.data.nosave) } | ||
61 | . = ALIGN(4096); | ||
62 | __nosave_end = .; | ||
63 | |||
64 | . = ALIGN(32); | ||
65 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | ||
66 | |||
67 | _edata = .; /* End of data section */ | 47 | _edata = .; /* End of data section */ |
68 | 48 | ||
69 | . = ALIGN(8192); /* init_task */ | ||
70 | .data.init_task : { *(.data.init_task) } | ||
71 | |||
72 | /* will be freed after init */ | 49 | /* will be freed after init */ |
73 | . = ALIGN(4096); /* Init code and data */ | 50 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
74 | __init_begin = .; | 51 | __init_begin = .; |
75 | .init.text : { | 52 | INIT_TEXT_SECTION(PAGE_SIZE) |
76 | _sinittext = .; | 53 | INIT_DATA_SECTION(16) |
77 | INIT_TEXT | 54 | PERCPU(PAGE_SIZE) |
78 | _einittext = .; | 55 | . = ALIGN(PAGE_SIZE); |
79 | } | ||
80 | .init.data : { INIT_DATA } | ||
81 | . = ALIGN(16); | ||
82 | __setup_start = .; | ||
83 | .init.setup : { *(.init.setup) } | ||
84 | __setup_end = .; | ||
85 | __initcall_start = .; | ||
86 | .initcall.init : { | ||
87 | INITCALLS | ||
88 | } | ||
89 | __initcall_end = .; | ||
90 | __con_initcall_start = .; | ||
91 | .con_initcall.init : { *(.con_initcall.init) } | ||
92 | __con_initcall_end = .; | ||
93 | SECURITY_INIT | ||
94 | . = ALIGN(4); | ||
95 | __alt_instructions = .; | ||
96 | .altinstructions : { *(.altinstructions) } | ||
97 | __alt_instructions_end = .; | ||
98 | .altinstr_replacement : { *(.altinstr_replacement) } | ||
99 | /* .exit.text is discard at runtime, not link time, to deal with references | ||
100 | from .altinstructions and .eh_frame */ | ||
101 | .exit.text : { EXIT_TEXT } | ||
102 | .exit.data : { EXIT_DATA } | ||
103 | |||
104 | #ifdef CONFIG_BLK_DEV_INITRD | ||
105 | . = ALIGN(4096); | ||
106 | __initramfs_start = .; | ||
107 | .init.ramfs : { *(.init.ramfs) } | ||
108 | __initramfs_end = .; | ||
109 | #endif | ||
110 | |||
111 | PERCPU(4096) | ||
112 | . = ALIGN(4096); | ||
113 | __init_end = .; | 56 | __init_end = .; |
114 | /* freed after init ends here */ | 57 | /* freed after init ends here */ |
115 | 58 | ||
116 | __bss_start = .; /* BSS */ | 59 | BSS_SECTION(0, 0, 4) |
117 | .bss : { *(.bss) } | ||
118 | . = ALIGN(4); | ||
119 | __bss_stop = .; | ||
120 | 60 | ||
121 | _end = . ; | 61 | _end = . ; |
122 | 62 | ||