diff options
-rw-r--r-- | arch/xtensa/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/xtensa/kernel/vmlinux.lds.S | 78 | ||||
-rw-r--r-- | include/asm-xtensa/bitops.h | 15 | ||||
-rw-r--r-- | include/asm-xtensa/byteorder.h | 3 | ||||
-rw-r--r-- | include/asm-xtensa/mmu_context.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/page.h | 2 | ||||
-rw-r--r-- | include/asm-xtensa/param.h | 4 | ||||
-rw-r--r-- | include/asm-xtensa/ptrace.h | 5 | ||||
-rw-r--r-- | include/asm-xtensa/shmparam.h | 2 | ||||
-rw-r--r-- | include/asm-xtensa/thread_info.h | 2 |
10 files changed, 50 insertions, 63 deletions
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 1ecf6716c327..2e8d398cf196 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/platform.h> | 41 | #include <asm/platform.h> |
42 | #include <asm/page.h> | 42 | #include <asm/page.h> |
43 | #include <asm/setup.h> | 43 | #include <asm/setup.h> |
44 | #include <asm/param.h> | ||
44 | 45 | ||
45 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) | 46 | #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) |
46 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; | 47 | struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16}; |
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index 4b7b4ff79973..b0582c3c5f8d 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
@@ -84,9 +84,7 @@ SECTIONS | |||
84 | { | 84 | { |
85 | /* The .head.text section must be the first section! */ | 85 | /* The .head.text section must be the first section! */ |
86 | *(.head.text) | 86 | *(.head.text) |
87 | *(.literal) | 87 | *(.literal .text) |
88 | TEXT_TEXT | ||
89 | *(.srom.text) | ||
90 | VMLINUX_SYMBOL(__sched_text_start) = .; | 88 | VMLINUX_SYMBOL(__sched_text_start) = .; |
91 | *(.sched.literal .sched.text) | 89 | *(.sched.literal .sched.text) |
92 | VMLINUX_SYMBOL(__sched_text_end) = .; | 90 | VMLINUX_SYMBOL(__sched_text_end) = .; |
@@ -96,6 +94,7 @@ SECTIONS | |||
96 | 94 | ||
97 | } | 95 | } |
98 | _etext = .; | 96 | _etext = .; |
97 | PROVIDE (etext = .); | ||
99 | 98 | ||
100 | . = ALIGN(16); | 99 | . = ALIGN(16); |
101 | 100 | ||
@@ -103,32 +102,6 @@ SECTIONS | |||
103 | 102 | ||
104 | /* Relocation table */ | 103 | /* Relocation table */ |
105 | 104 | ||
106 | . = ALIGN(16); | ||
107 | __boot_reloc_table_start = ABSOLUTE(.); | ||
108 | |||
109 | __relocate : { | ||
110 | |||
111 | RELOCATE_ENTRY(_WindowVectors_text, | ||
112 | .WindowVectors.text); | ||
113 | #if 0 | ||
114 | RELOCATE_ENTRY(_KernelExceptionVector_literal, | ||
115 | .KernelExceptionVector.literal); | ||
116 | #endif | ||
117 | RELOCATE_ENTRY(_KernelExceptionVector_text, | ||
118 | .KernelExceptionVector.text); | ||
119 | #if 0 | ||
120 | RELOCATE_ENTRY(_UserExceptionVector_literal, | ||
121 | .UserExceptionVector.literal); | ||
122 | #endif | ||
123 | RELOCATE_ENTRY(_UserExceptionVector_text, | ||
124 | .UserExceptionVector.text); | ||
125 | RELOCATE_ENTRY(_DoubleExceptionVector_literal, | ||
126 | .DoubleExceptionVector.literal); | ||
127 | RELOCATE_ENTRY(_DoubleExceptionVector_text, | ||
128 | .DoubleExceptionVector.text); | ||
129 | } | ||
130 | __boot_reloc_table_end = ABSOLUTE(.) ; | ||
131 | |||
132 | .fixup : { *(.fixup) } | 105 | .fixup : { *(.fixup) } |
133 | 106 | ||
134 | . = ALIGN(16); | 107 | . = ALIGN(16); |
@@ -145,8 +118,7 @@ SECTIONS | |||
145 | _fdata = .; | 118 | _fdata = .; |
146 | .data : | 119 | .data : |
147 | { | 120 | { |
148 | DATA_DATA | 121 | *(.data) CONSTRUCTORS |
149 | CONSTRUCTORS | ||
150 | . = ALIGN(XCHAL_ICACHE_LINESIZE); | 122 | . = ALIGN(XCHAL_ICACHE_LINESIZE); |
151 | *(.data.cacheline_aligned) | 123 | *(.data.cacheline_aligned) |
152 | } | 124 | } |
@@ -174,6 +146,22 @@ SECTIONS | |||
174 | __tagtable_begin = .; | 146 | __tagtable_begin = .; |
175 | *(.taglist) | 147 | *(.taglist) |
176 | __tagtable_end = .; | 148 | __tagtable_end = .; |
149 | |||
150 | . = ALIGN(16); | ||
151 | __boot_reloc_table_start = ABSOLUTE(.); | ||
152 | |||
153 | RELOCATE_ENTRY(_WindowVectors_text, | ||
154 | .WindowVectors.text); | ||
155 | RELOCATE_ENTRY(_KernelExceptionVector_text, | ||
156 | .KernelExceptionVector.text); | ||
157 | RELOCATE_ENTRY(_UserExceptionVector_text, | ||
158 | .UserExceptionVector.text); | ||
159 | RELOCATE_ENTRY(_DoubleExceptionVector_literal, | ||
160 | .DoubleExceptionVector.literal); | ||
161 | RELOCATE_ENTRY(_DoubleExceptionVector_text, | ||
162 | .DoubleExceptionVector.text); | ||
163 | |||
164 | __boot_reloc_table_end = ABSOLUTE(.) ; | ||
177 | } | 165 | } |
178 | 166 | ||
179 | . = ALIGN(XCHAL_ICACHE_LINESIZE); | 167 | . = ALIGN(XCHAL_ICACHE_LINESIZE); |
@@ -194,16 +182,6 @@ SECTIONS | |||
194 | 182 | ||
195 | SECURITY_INIT | 183 | SECURITY_INIT |
196 | 184 | ||
197 | . = ALIGN(4); | ||
198 | |||
199 | __start___ftr_fixup = .; | ||
200 | __ftr_fixup : { *(__ftr_fixup) } | ||
201 | __stop___ftr_fixup = .; | ||
202 | |||
203 | . = ALIGN(4096); | ||
204 | __per_cpu_start = .; | ||
205 | .data.percpu : { *(.data.percpu) } | ||
206 | __per_cpu_end = .; | ||
207 | 185 | ||
208 | #ifdef CONFIG_BLK_DEV_INITRD | 186 | #ifdef CONFIG_BLK_DEV_INITRD |
209 | . = ALIGN(4096); | 187 | . = ALIGN(4096); |
@@ -212,6 +190,12 @@ SECTIONS | |||
212 | __initramfs_end = .; | 190 | __initramfs_end = .; |
213 | #endif | 191 | #endif |
214 | 192 | ||
193 | . = ALIGN(4096); | ||
194 | __per_cpu_start = .; | ||
195 | .data.percpu : { *(.data.percpu) } | ||
196 | __per_cpu_end = .; | ||
197 | |||
198 | |||
215 | /* We need this dummy segment here */ | 199 | /* We need this dummy segment here */ |
216 | 200 | ||
217 | . = ALIGN(4); | 201 | . = ALIGN(4); |
@@ -273,9 +257,9 @@ SECTIONS | |||
273 | 257 | ||
274 | /* BSS section */ | 258 | /* BSS section */ |
275 | _bss_start = .; | 259 | _bss_start = .; |
276 | .sbss : { *(.sbss) *(.scommon) } | 260 | .bss : { *(.bss.page_aligned) *(.bss) } |
277 | .bss : { *(COMMON) *(.bss) } | ||
278 | _bss_end = .; | 261 | _bss_end = .; |
262 | |||
279 | _end = .; | 263 | _end = .; |
280 | 264 | ||
281 | /* only used by the boot loader */ | 265 | /* only used by the boot loader */ |
@@ -293,16 +277,16 @@ SECTIONS | |||
293 | *(.ResetVector.text) | 277 | *(.ResetVector.text) |
294 | } | 278 | } |
295 | 279 | ||
296 | |||
297 | /* Sections to be discarded */ | 280 | /* Sections to be discarded */ |
298 | /DISCARD/ : | 281 | /DISCARD/ : |
299 | { | 282 | { |
300 | *(.text.exit) | 283 | *(.exit.literal .exit.text) |
301 | *(.text.exit.literal) | 284 | *(.exit.data) |
302 | *(.data.exit) | ||
303 | *(.exitcall.exit) | 285 | *(.exitcall.exit) |
304 | } | 286 | } |
305 | 287 | ||
288 | .xt.lit : { *(.xt.lit) } | ||
289 | .xt.prop : { *(.xt.prop) } | ||
306 | 290 | ||
307 | .debug 0 : { *(.debug) } | 291 | .debug 0 : { *(.debug) } |
308 | .line 0 : { *(.line) } | 292 | .line 0 : { *(.line) } |
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h index 96303dff3ee4..1c1e0d933eea 100644 --- a/include/asm-xtensa/bitops.h +++ b/include/asm-xtensa/bitops.h | |||
@@ -57,9 +57,6 @@ static inline int __ffs(unsigned long x) | |||
57 | return 31 - __cntlz(x & -x); | 57 | return 31 - __cntlz(x & -x); |
58 | } | 58 | } |
59 | 59 | ||
60 | |||
61 | #ifdef __KERNEL__ | ||
62 | |||
63 | /* | 60 | /* |
64 | * ffs: Find first bit set in word. This is defined the same way as | 61 | * ffs: Find first bit set in word. This is defined the same way as |
65 | * the libc and compiler builtin ffs routines, therefore | 62 | * the libc and compiler builtin ffs routines, therefore |
@@ -97,11 +94,15 @@ static inline int fls (unsigned int x) | |||
97 | #include <asm-generic/bitops/ext2-non-atomic.h> | 94 | #include <asm-generic/bitops/ext2-non-atomic.h> |
98 | 95 | ||
99 | #ifdef __XTENSA_EL__ | 96 | #ifdef __XTENSA_EL__ |
100 | # define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr),(addr)) | 97 | # define ext2_set_bit_atomic(lock,nr,addr) \ |
101 | # define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr),(addr)) | 98 | test_and_set_bit((nr), (unsigned long*)(addr)) |
99 | # define ext2_clear_bit_atomic(lock,nr,addr) \ | ||
100 | test_and_clear_bit((nr), (unsigned long*)(addr)) | ||
102 | #elif defined(__XTENSA_EB__) | 101 | #elif defined(__XTENSA_EB__) |
103 | # define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr) ^ 0x18, (addr)) | 102 | # define ext2_set_bit_atomic(lock,nr,addr) \ |
104 | # define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr)^0x18,(addr)) | 103 | test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr)) |
104 | # define ext2_clear_bit_atomic(lock,nr,addr) \ | ||
105 | test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr)) | ||
105 | #else | 106 | #else |
106 | # error processor byte order undefined! | 107 | # error processor byte order undefined! |
107 | #endif | 108 | #endif |
diff --git a/include/asm-xtensa/byteorder.h b/include/asm-xtensa/byteorder.h index 0f540a5f4c01..765edf17a9a4 100644 --- a/include/asm-xtensa/byteorder.h +++ b/include/asm-xtensa/byteorder.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define _XTENSA_BYTEORDER_H | 12 | #define _XTENSA_BYTEORDER_H |
13 | 13 | ||
14 | #include <asm/types.h> | 14 | #include <asm/types.h> |
15 | #include <linux/compiler.h> | ||
15 | 16 | ||
16 | static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) | 17 | static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) |
17 | { | 18 | { |
@@ -78,4 +79,4 @@ static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) | |||
78 | # error processor byte order undefined! | 79 | # error processor byte order undefined! |
79 | #endif | 80 | #endif |
80 | 81 | ||
81 | #endif /* __ASM_XTENSA_BYTEORDER_H */ | 82 | #endif /* _XTENSA_BYTEORDER_H */ |
diff --git a/include/asm-xtensa/mmu_context.h b/include/asm-xtensa/mmu_context.h index 92f948392ebc..c0fd8e5b4513 100644 --- a/include/asm-xtensa/mmu_context.h +++ b/include/asm-xtensa/mmu_context.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define _XTENSA_MMU_CONTEXT_H | 14 | #define _XTENSA_MMU_CONTEXT_H |
15 | 15 | ||
16 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
17 | #include <linux/sched.h> | ||
17 | 18 | ||
18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
19 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h index c631d006194b..1213cde75438 100644 --- a/include/asm-xtensa/page.h +++ b/include/asm-xtensa/page.h | |||
@@ -131,6 +131,6 @@ void copy_user_page(void *to,void* from,unsigned long vaddr,struct page* page); | |||
131 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 131 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
132 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 132 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
133 | 133 | ||
134 | #endif /* __KERNEL__ */ | ||
135 | #include <asm-generic/memory_model.h> | 134 | #include <asm-generic/memory_model.h> |
135 | #endif /* __KERNEL__ */ | ||
136 | #endif /* _XTENSA_PAGE_H */ | 136 | #endif /* _XTENSA_PAGE_H */ |
diff --git a/include/asm-xtensa/param.h b/include/asm-xtensa/param.h index 6f281392e3f8..ce3a336cad07 100644 --- a/include/asm-xtensa/param.h +++ b/include/asm-xtensa/param.h | |||
@@ -11,15 +11,13 @@ | |||
11 | #ifndef _XTENSA_PARAM_H | 11 | #ifndef _XTENSA_PARAM_H |
12 | #define _XTENSA_PARAM_H | 12 | #define _XTENSA_PARAM_H |
13 | 13 | ||
14 | #include <asm/variant/core.h> | ||
15 | |||
16 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
17 | # define HZ 100 /* internal timer frequency */ | 15 | # define HZ 100 /* internal timer frequency */ |
18 | # define USER_HZ 100 /* for user interfaces in "ticks" */ | 16 | # define USER_HZ 100 /* for user interfaces in "ticks" */ |
19 | # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ | 17 | # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ |
20 | #endif | 18 | #endif |
21 | 19 | ||
22 | #define EXEC_PAGESIZE (1 << XCHAL_MMU_MIN_PTE_PAGE_SIZE) | 20 | #define EXEC_PAGESIZE 4096 |
23 | 21 | ||
24 | #ifndef NGROUPS | 22 | #ifndef NGROUPS |
25 | #define NGROUPS 32 | 23 | #define NGROUPS 32 |
diff --git a/include/asm-xtensa/ptrace.h b/include/asm-xtensa/ptrace.h index 1b7fe363fad1..cad83e814d69 100644 --- a/include/asm-xtensa/ptrace.h +++ b/include/asm-xtensa/ptrace.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef _XTENSA_PTRACE_H | 11 | #ifndef _XTENSA_PTRACE_H |
12 | #define _XTENSA_PTRACE_H | 12 | #define _XTENSA_PTRACE_H |
13 | 13 | ||
14 | #include <asm/variant/core.h> | ||
15 | |||
16 | /* | 14 | /* |
17 | * Kernel stack | 15 | * Kernel stack |
18 | * | 16 | * |
@@ -113,6 +111,9 @@ struct pt_regs { | |||
113 | }; | 111 | }; |
114 | 112 | ||
115 | #ifdef __KERNEL__ | 113 | #ifdef __KERNEL__ |
114 | |||
115 | #include <asm/variant/core.h> | ||
116 | |||
116 | # define task_pt_regs(tsk) ((struct pt_regs*) \ | 117 | # define task_pt_regs(tsk) ((struct pt_regs*) \ |
117 | (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) | 118 | (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) |
118 | # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) | 119 | # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) |
diff --git a/include/asm-xtensa/shmparam.h b/include/asm-xtensa/shmparam.h index d3b65bfa71c3..c8cc16c3da9e 100644 --- a/include/asm-xtensa/shmparam.h +++ b/include/asm-xtensa/shmparam.h | |||
@@ -9,8 +9,6 @@ | |||
9 | #ifndef _XTENSA_SHMPARAM_H | 9 | #ifndef _XTENSA_SHMPARAM_H |
10 | #define _XTENSA_SHMPARAM_H | 10 | #define _XTENSA_SHMPARAM_H |
11 | 11 | ||
12 | #include <asm/processor.h> | ||
13 | |||
14 | /* | 12 | /* |
15 | * Xtensa can have variable size caches, and if | 13 | * Xtensa can have variable size caches, and if |
16 | * the size of single way is larger than the page size, | 14 | * the size of single way is larger than the page size, |
diff --git a/include/asm-xtensa/thread_info.h b/include/asm-xtensa/thread_info.h index 5ae34ab71597..3fa29799b435 100644 --- a/include/asm-xtensa/thread_info.h +++ b/include/asm-xtensa/thread_info.h | |||
@@ -116,6 +116,7 @@ static inline struct thread_info *current_thread_info(void) | |||
116 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 116 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
117 | #define TIF_IRET 5 /* return with iret */ | 117 | #define TIF_IRET 5 /* return with iret */ |
118 | #define TIF_MEMDIE 6 | 118 | #define TIF_MEMDIE 6 |
119 | #define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal() */ | ||
119 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 120 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
120 | 121 | ||
121 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 122 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
@@ -125,6 +126,7 @@ static inline struct thread_info *current_thread_info(void) | |||
125 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 126 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
126 | #define _TIF_IRET (1<<TIF_IRET) | 127 | #define _TIF_IRET (1<<TIF_IRET) |
127 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 128 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
129 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
128 | 130 | ||
129 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 131 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
130 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 132 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |