diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 11:32:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 11:32:05 -0400 |
commit | a6e995ad7409403c5bbd6fe8f666a280e086bb22 (patch) | |
tree | 3fdf4ece186941719de154d4ab973a95d451fe5d | |
parent | 547ad5ac665234953e32678f6a32385b58edefc3 (diff) | |
parent | 7e483865612568268773317219d07b38a8c4d62d (diff) |
Merge branch 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score
* 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score:
score: update email address in MAINTAINERS.
score: Cleanup linker script using new macros.
score: Make THREAD_SIZE available to assembly files.
score: Make PAGE_SIZE available to assembly.
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | arch/score/include/asm/page.h | 3 | ||||
-rw-r--r-- | arch/score/include/asm/thread_info.h | 15 | ||||
-rw-r--r-- | arch/score/kernel/vmlinux.lds.S | 77 |
4 files changed, 21 insertions, 76 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index d8973ca86f2a..ed6cd99a57ba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4465,7 +4465,7 @@ SCORE ARCHITECTURE | |||
4465 | P: Chen Liqin | 4465 | P: Chen Liqin |
4466 | M: liqin.chen@sunplusct.com | 4466 | M: liqin.chen@sunplusct.com |
4467 | P: Lennox Wu | 4467 | P: Lennox Wu |
4468 | M: lennox.wu@sunplusct.com | 4468 | M: lennox.wu@gmail.com |
4469 | W: http://www.sunplusct.com | 4469 | W: http://www.sunplusct.com |
4470 | S: Supported | 4470 | S: Supported |
4471 | 4471 | ||
diff --git a/arch/score/include/asm/page.h b/arch/score/include/asm/page.h index ee5821042fcc..d92a5a2d36d4 100644 --- a/arch/score/include/asm/page.h +++ b/arch/score/include/asm/page.h | |||
@@ -2,10 +2,11 @@ | |||
2 | #define _ASM_SCORE_PAGE_H | 2 | #define _ASM_SCORE_PAGE_H |
3 | 3 | ||
4 | #include <linux/pfn.h> | 4 | #include <linux/pfn.h> |
5 | #include <linux/const.h> | ||
5 | 6 | ||
6 | /* PAGE_SHIFT determines the page size */ | 7 | /* PAGE_SHIFT determines the page size */ |
7 | #define PAGE_SHIFT (12) | 8 | #define PAGE_SHIFT (12) |
8 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 9 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) |
9 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 10 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
10 | 11 | ||
11 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h index 3a1122885528..55939992c27d 100644 --- a/arch/score/include/asm/thread_info.h +++ b/arch/score/include/asm/thread_info.h | |||
@@ -7,6 +7,15 @@ | |||
7 | #define KU_USER 0x08 | 7 | #define KU_USER 0x08 |
8 | #define KU_KERN 0x00 | 8 | #define KU_KERN 0x00 |
9 | 9 | ||
10 | #include <asm/page.h> | ||
11 | #include <linux/const.h> | ||
12 | |||
13 | /* thread information allocation */ | ||
14 | #define THREAD_SIZE_ORDER (1) | ||
15 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) | ||
16 | #define THREAD_MASK (THREAD_SIZE - _AC(1,UL)) | ||
17 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
18 | |||
10 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
11 | 20 | ||
12 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
@@ -62,12 +71,6 @@ struct thread_info { | |||
62 | register struct thread_info *__current_thread_info __asm__("r28"); | 71 | register struct thread_info *__current_thread_info __asm__("r28"); |
63 | #define current_thread_info() __current_thread_info | 72 | #define current_thread_info() __current_thread_info |
64 | 73 | ||
65 | /* thread information allocation */ | ||
66 | #define THREAD_SIZE_ORDER (1) | ||
67 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) | ||
68 | #define THREAD_MASK (THREAD_SIZE - 1UL) | ||
69 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
70 | |||
71 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 74 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) |
72 | #define free_thread_info(info) kfree(info) | 75 | #define free_thread_info(info) kfree(info) |
73 | 76 | ||
diff --git a/arch/score/kernel/vmlinux.lds.S b/arch/score/kernel/vmlinux.lds.S index f85569831d5c..eebcbaa4e978 100644 --- a/arch/score/kernel/vmlinux.lds.S +++ b/arch/score/kernel/vmlinux.lds.S | |||
@@ -24,6 +24,8 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <asm-generic/vmlinux.lds.h> | 26 | #include <asm-generic/vmlinux.lds.h> |
27 | #include <asm/thread_info.h> | ||
28 | #include <asm/page.h> | ||
27 | 29 | ||
28 | OUTPUT_ARCH(score) | 30 | OUTPUT_ARCH(score) |
29 | ENTRY(_stext) | 31 | ENTRY(_stext) |
@@ -49,21 +51,9 @@ SECTIONS | |||
49 | . = ALIGN(16); | 51 | . = ALIGN(16); |
50 | RODATA | 52 | RODATA |
51 | 53 | ||
52 | /* Exception table */ | 54 | EXCEPTION_TABLE(16) |
53 | . = ALIGN(16); | ||
54 | __ex_table : { | ||
55 | __start___ex_table = .; | ||
56 | *(__ex_table) | ||
57 | __stop___ex_table = .; | ||
58 | } | ||
59 | 55 | ||
60 | /* writeable */ | 56 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) |
61 | .data ALIGN (4096): { | ||
62 | *(.data.init_task) | ||
63 | |||
64 | DATA_DATA | ||
65 | CONSTRUCTORS | ||
66 | } | ||
67 | 57 | ||
68 | /* We want the small data sections together, so single-instruction offsets | 58 | /* We want the small data sections together, so single-instruction offsets |
69 | can access them all, and initialized data all before uninitialized, so | 59 | can access them all, and initialized data all before uninitialized, so |
@@ -72,45 +62,14 @@ SECTIONS | |||
72 | .sdata : { | 62 | .sdata : { |
73 | *(.sdata) | 63 | *(.sdata) |
74 | } | 64 | } |
75 | |||
76 | . = ALIGN(32); | ||
77 | .data.cacheline_aligned : { | ||
78 | *(.data.cacheline_aligned) | ||
79 | } | ||
80 | _edata = .; /* End of data section */ | 65 | _edata = .; /* End of data section */ |
81 | 66 | ||
82 | /* will be freed after init */ | 67 | /* will be freed after init */ |
83 | . = ALIGN(4096); /* Init code and data */ | 68 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
84 | __init_begin = .; | 69 | __init_begin = .; |
85 | 70 | ||
86 | . = ALIGN(4096); | 71 | INIT_TEXT_SECTION(PAGE_SIZE) |
87 | .init.text : { | 72 | INIT_DATA_SECTION(16) |
88 | _sinittext = .; | ||
89 | INIT_TEXT | ||
90 | _einittext = .; | ||
91 | } | ||
92 | .init.data : { | ||
93 | INIT_DATA | ||
94 | } | ||
95 | . = ALIGN(16); | ||
96 | .init.setup : { | ||
97 | __setup_start = .; | ||
98 | *(.init.setup) | ||
99 | __setup_end = .; | ||
100 | } | ||
101 | |||
102 | .initcall.init : { | ||
103 | __initcall_start = .; | ||
104 | INITCALLS | ||
105 | __initcall_end = .; | ||
106 | } | ||
107 | |||
108 | .con_initcall.init : { | ||
109 | __con_initcall_start = .; | ||
110 | *(.con_initcall.init) | ||
111 | __con_initcall_end = .; | ||
112 | } | ||
113 | SECURITY_INIT | ||
114 | 73 | ||
115 | /* .exit.text is discarded at runtime, not link time, to deal with | 74 | /* .exit.text is discarded at runtime, not link time, to deal with |
116 | * references from .rodata | 75 | * references from .rodata |
@@ -121,28 +80,10 @@ SECTIONS | |||
121 | .exit.data : { | 80 | .exit.data : { |
122 | EXIT_DATA | 81 | EXIT_DATA |
123 | } | 82 | } |
124 | #if defined(CONFIG_BLK_DEV_INITRD) | 83 | . = ALIGN(PAGE_SIZE); |
125 | .init.ramfs ALIGN(4096): { | ||
126 | __initramfs_start = .; | ||
127 | *(.init.ramfs) | ||
128 | __initramfs_end = .; | ||
129 | . = ALIGN(4); | ||
130 | LONG(0); | ||
131 | } | ||
132 | #endif | ||
133 | . = ALIGN(4096); | ||
134 | __init_end = .; | 84 | __init_end = .; |
135 | /* freed after init ends here */ | 85 | /* freed after init ends here */ |
136 | 86 | ||
137 | __bss_start = .; /* BSS */ | 87 | BSS_SECTION(0, 0, 0) |
138 | .sbss : { | ||
139 | *(.sbss) | ||
140 | *(.scommon) | ||
141 | } | ||
142 | .bss : { | ||
143 | *(.bss) | ||
144 | *(COMMON) | ||
145 | } | ||
146 | __bss_stop = .; | ||
147 | _end = .; | 88 | _end = .; |
148 | } | 89 | } |