diff options
author | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
commit | 94bc2be31a01a3055ec94176e595dfe208e92d3b (patch) | |
tree | ebfbe81c6718a6390bfa1b99c6d228237d818576 /arch/sh | |
parent | c32a0b689cb9cc160cfcd19735bbf50bb70c6ef4 (diff) | |
parent | 58cba4650a7a414eabd2b40cc9d8e45fcdf192d9 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 4 | ||||
-rw-r--r-- | arch/sh/kernel/process.c | 66 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace.c | 14 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/smp.c | 2 |
5 files changed, 11 insertions, 77 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 64f5ae0ff9..8cf6d437a6 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -14,10 +14,6 @@ config SUPERH | |||
14 | gaming console. The SuperH port has a home page at | 14 | gaming console. The SuperH port has a home page at |
15 | <http://www.linux-sh.org/>. | 15 | <http://www.linux-sh.org/>. |
16 | 16 | ||
17 | config UID16 | ||
18 | bool | ||
19 | default y | ||
20 | |||
21 | config RWSEM_GENERIC_SPINLOCK | 17 | config RWSEM_GENERIC_SPINLOCK |
22 | bool | 18 | bool |
23 | default y | 19 | default y |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index fd4f240b83..aac15e42d0 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -191,13 +191,8 @@ void flush_thread(void) | |||
191 | { | 191 | { |
192 | #if defined(CONFIG_SH_FPU) | 192 | #if defined(CONFIG_SH_FPU) |
193 | struct task_struct *tsk = current; | 193 | struct task_struct *tsk = current; |
194 | struct pt_regs *regs = (struct pt_regs *) | ||
195 | ((unsigned long)tsk->thread_info | ||
196 | + THREAD_SIZE - sizeof(struct pt_regs) | ||
197 | - sizeof(unsigned long)); | ||
198 | |||
199 | /* Forget lazy FPU state */ | 194 | /* Forget lazy FPU state */ |
200 | clear_fpu(tsk, regs); | 195 | clear_fpu(tsk, task_pt_regs(tsk)); |
201 | clear_used_math(); | 196 | clear_used_math(); |
202 | #endif | 197 | #endif |
203 | } | 198 | } |
@@ -232,13 +227,7 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | |||
232 | { | 227 | { |
233 | struct pt_regs ptregs; | 228 | struct pt_regs ptregs; |
234 | 229 | ||
235 | ptregs = *(struct pt_regs *) | 230 | ptregs = *task_pt_regs(tsk); |
236 | ((unsigned long)tsk->thread_info + THREAD_SIZE | ||
237 | - sizeof(struct pt_regs) | ||
238 | #ifdef CONFIG_SH_DSP | ||
239 | - sizeof(struct pt_dspregs) | ||
240 | #endif | ||
241 | - sizeof(unsigned long)); | ||
242 | elf_core_copy_regs(regs, &ptregs); | 231 | elf_core_copy_regs(regs, &ptregs); |
243 | 232 | ||
244 | return 1; | 233 | return 1; |
@@ -252,11 +241,7 @@ dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *fpu) | |||
252 | #if defined(CONFIG_SH_FPU) | 241 | #if defined(CONFIG_SH_FPU) |
253 | fpvalid = !!tsk_used_math(tsk); | 242 | fpvalid = !!tsk_used_math(tsk); |
254 | if (fpvalid) { | 243 | if (fpvalid) { |
255 | struct pt_regs *regs = (struct pt_regs *) | 244 | unlazy_fpu(tsk, task_pt_regs(tsk)); |
256 | ((unsigned long)tsk->thread_info | ||
257 | + THREAD_SIZE - sizeof(struct pt_regs) | ||
258 | - sizeof(unsigned long)); | ||
259 | unlazy_fpu(tsk, regs); | ||
260 | memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); | 245 | memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); |
261 | } | 246 | } |
262 | #endif | 247 | #endif |
@@ -279,18 +264,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
279 | copy_to_stopped_child_used_math(p); | 264 | copy_to_stopped_child_used_math(p); |
280 | #endif | 265 | #endif |
281 | 266 | ||
282 | childregs = ((struct pt_regs *) | 267 | childregs = task_pt_regs(p); |
283 | (THREAD_SIZE + (unsigned long) p->thread_info) | ||
284 | #ifdef CONFIG_SH_DSP | ||
285 | - sizeof(struct pt_dspregs) | ||
286 | #endif | ||
287 | - sizeof(unsigned long)) - 1; | ||
288 | *childregs = *regs; | 268 | *childregs = *regs; |
289 | 269 | ||
290 | if (user_mode(regs)) { | 270 | if (user_mode(regs)) { |
291 | childregs->regs[15] = usp; | 271 | childregs->regs[15] = usp; |
292 | } else { | 272 | } else { |
293 | childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE; | 273 | childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; |
294 | } | 274 | } |
295 | if (clone_flags & CLONE_SETTLS) { | 275 | if (clone_flags & CLONE_SETTLS) { |
296 | childregs->gbr = childregs->regs[0]; | 276 | childregs->gbr = childregs->regs[0]; |
@@ -305,26 +285,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
305 | return 0; | 285 | return 0; |
306 | } | 286 | } |
307 | 287 | ||
308 | /* | ||
309 | * fill in the user structure for a core dump.. | ||
310 | */ | ||
311 | void dump_thread(struct pt_regs * regs, struct user * dump) | ||
312 | { | ||
313 | dump->magic = CMAGIC; | ||
314 | dump->start_code = current->mm->start_code; | ||
315 | dump->start_data = current->mm->start_data; | ||
316 | dump->start_stack = regs->regs[15] & ~(PAGE_SIZE - 1); | ||
317 | dump->u_tsize = (current->mm->end_code - dump->start_code) >> PAGE_SHIFT; | ||
318 | dump->u_dsize = (current->mm->brk + (PAGE_SIZE-1) - dump->start_data) >> PAGE_SHIFT; | ||
319 | dump->u_ssize = (current->mm->start_stack - dump->start_stack + | ||
320 | PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
321 | /* Debug registers will come here. */ | ||
322 | |||
323 | dump->regs = *regs; | ||
324 | |||
325 | dump->u_fpvalid = dump_fpu(regs, &dump->fpu); | ||
326 | } | ||
327 | |||
328 | /* Tracing by user break controller. */ | 288 | /* Tracing by user break controller. */ |
329 | static void | 289 | static void |
330 | ubc_set_tracing(int asid, unsigned long pc) | 290 | ubc_set_tracing(int asid, unsigned long pc) |
@@ -353,11 +313,7 @@ ubc_set_tracing(int asid, unsigned long pc) | |||
353 | struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *next) | 313 | struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *next) |
354 | { | 314 | { |
355 | #if defined(CONFIG_SH_FPU) | 315 | #if defined(CONFIG_SH_FPU) |
356 | struct pt_regs *regs = (struct pt_regs *) | 316 | unlazy_fpu(prev, task_pt_regs(prev)); |
357 | ((unsigned long)prev->thread_info | ||
358 | + THREAD_SIZE - sizeof(struct pt_regs) | ||
359 | - sizeof(unsigned long)); | ||
360 | unlazy_fpu(prev, regs); | ||
361 | #endif | 317 | #endif |
362 | 318 | ||
363 | #ifdef CONFIG_PREEMPT | 319 | #ifdef CONFIG_PREEMPT |
@@ -366,13 +322,7 @@ struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *ne | |||
366 | struct pt_regs *regs; | 322 | struct pt_regs *regs; |
367 | 323 | ||
368 | local_irq_save(flags); | 324 | local_irq_save(flags); |
369 | regs = (struct pt_regs *) | 325 | regs = task_pt_regs(prev); |
370 | ((unsigned long)prev->thread_info | ||
371 | + THREAD_SIZE - sizeof(struct pt_regs) | ||
372 | #ifdef CONFIG_SH_DSP | ||
373 | - sizeof(struct pt_dspregs) | ||
374 | #endif | ||
375 | - sizeof(unsigned long)); | ||
376 | if (user_mode(regs) && regs->regs[15] >= 0xc0000000) { | 326 | if (user_mode(regs) && regs->regs[15] >= 0xc0000000) { |
377 | int offset = (int)regs->regs[15]; | 327 | int offset = (int)regs->regs[15]; |
378 | 328 | ||
@@ -392,7 +342,7 @@ struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *ne | |||
392 | */ | 342 | */ |
393 | asm volatile("ldc %0, r7_bank" | 343 | asm volatile("ldc %0, r7_bank" |
394 | : /* no output */ | 344 | : /* no output */ |
395 | : "r" (next->thread_info)); | 345 | : "r" (task_thread_info(next))); |
396 | 346 | ||
397 | #ifdef CONFIG_MMU | 347 | #ifdef CONFIG_MMU |
398 | /* If no tasks are using the UBC, we're done */ | 348 | /* If no tasks are using the UBC, we're done */ |
diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c index 1a8be06519..3887b4f6fe 100644 --- a/arch/sh/kernel/ptrace.c +++ b/arch/sh/kernel/ptrace.c | |||
@@ -41,12 +41,7 @@ static inline int get_stack_long(struct task_struct *task, int offset) | |||
41 | { | 41 | { |
42 | unsigned char *stack; | 42 | unsigned char *stack; |
43 | 43 | ||
44 | stack = (unsigned char *) | 44 | stack = (unsigned char *)task_pt_regs(task); |
45 | task->thread_info + THREAD_SIZE - sizeof(struct pt_regs) | ||
46 | #ifdef CONFIG_SH_DSP | ||
47 | - sizeof(struct pt_dspregs) | ||
48 | #endif | ||
49 | - sizeof(unsigned long); | ||
50 | stack += offset; | 45 | stack += offset; |
51 | return (*((int *)stack)); | 46 | return (*((int *)stack)); |
52 | } | 47 | } |
@@ -59,12 +54,7 @@ static inline int put_stack_long(struct task_struct *task, int offset, | |||
59 | { | 54 | { |
60 | unsigned char *stack; | 55 | unsigned char *stack; |
61 | 56 | ||
62 | stack = (unsigned char *) | 57 | stack = (unsigned char *)task_pt_regs(task); |
63 | task->thread_info + THREAD_SIZE - sizeof(struct pt_regs) | ||
64 | #ifdef CONFIG_SH_DSP | ||
65 | - sizeof(struct pt_dspregs) | ||
66 | #endif | ||
67 | - sizeof(unsigned long); | ||
68 | stack += offset; | 58 | stack += offset; |
69 | *(unsigned long *) stack = data; | 59 | *(unsigned long *) stack = data; |
70 | return 0; | 60 | return 0; |
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 6954fd6247..1cf94a618b 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -21,14 +21,12 @@ | |||
21 | #include <asm/cacheflush.h> | 21 | #include <asm/cacheflush.h> |
22 | #include <asm/checksum.h> | 22 | #include <asm/checksum.h> |
23 | 23 | ||
24 | extern void dump_thread(struct pt_regs *, struct user *); | ||
25 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); | 24 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); |
26 | extern struct hw_interrupt_type no_irq_type; | 25 | extern struct hw_interrupt_type no_irq_type; |
27 | 26 | ||
28 | EXPORT_SYMBOL(sh_mv); | 27 | EXPORT_SYMBOL(sh_mv); |
29 | 28 | ||
30 | /* platform dependent support */ | 29 | /* platform dependent support */ |
31 | EXPORT_SYMBOL(dump_thread); | ||
32 | EXPORT_SYMBOL(dump_fpu); | 30 | EXPORT_SYMBOL(dump_fpu); |
33 | EXPORT_SYMBOL(iounmap); | 31 | EXPORT_SYMBOL(iounmap); |
34 | EXPORT_SYMBOL(enable_irq); | 32 | EXPORT_SYMBOL(enable_irq); |
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 59e49b1825..62c7d1c0ad 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -103,7 +103,7 @@ int __cpu_up(unsigned int cpu) | |||
103 | if (IS_ERR(tsk)) | 103 | if (IS_ERR(tsk)) |
104 | panic("Failed forking idle task for cpu %d\n", cpu); | 104 | panic("Failed forking idle task for cpu %d\n", cpu); |
105 | 105 | ||
106 | tsk->thread_info->cpu = cpu; | 106 | task_thread_info(tsk)->cpu = cpu; |
107 | 107 | ||
108 | cpu_set(cpu, cpu_online_map); | 108 | cpu_set(cpu, cpu_online_map); |
109 | 109 | ||