X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Fprocess.c;h=4933f3ce58339c182897fe08d25f4e329083cae4;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=297e4b48bfe2f025a60c0e5d77ff36835af3ba08;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 297e4b48b..4933f3ce5 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -119,8 +119,8 @@ common_shutdown_1(void *generic_ptr) #ifdef CONFIG_SMP /* Wait for the secondaries to halt. */ - clear_bit(boot_cpuid, &cpu_present_mask); - while (cpu_present_mask) + cpu_clear(boot_cpuid, cpu_possible_map); + while (cpus_weight(cpu_possible_map)) barrier(); #endif @@ -189,7 +189,7 @@ EXPORT_SYMBOL(machine_power_off); void show_regs(struct pt_regs *regs) { - dik_show_regs(regs, 0); + dik_show_regs(regs, NULL); } /* @@ -239,14 +239,14 @@ release_thread(struct task_struct *dead_task) * with parameters (SIGCHLD, 0). */ int -alpha_clone(unsigned long clone_flags, unsigned long usp, int *parent_tid, - int *child_tid, unsigned long tls_value, struct pt_regs *regs) +alpha_clone(unsigned long clone_flags, unsigned long usp, + int __user *parent_tid, int __user *child_tid, + unsigned long tls_value, struct pt_regs *regs) { if (!usp) usp = rdusp(); - return do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, - parent_tid, child_tid); + return do_fork(clone_flags, usp, regs, 0, parent_tid, child_tid); } int @@ -455,18 +455,10 @@ dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task) /* * sys_execve() executes a new program. - * - * This works due to the alpha calling sequence: the first 6 args - * are gotten from registers, while the rest is on the stack, so - * we get a0-a5 for free, and then magically find "struct pt_regs" - * on the stack for us.. - * - * Don't do this at home. */ asmlinkage int -sys_execve(char *ufilename, char **argv, char **envp, - unsigned long a3, unsigned long a4, unsigned long a5, - struct pt_regs regs) +do_sys_execve(char __user *ufilename, char __user * __user *argv, + char __user * __user *envp, struct pt_regs *regs) { int error; char *filename; @@ -475,7 +467,7 @@ sys_execve(char *ufilename, char **argv, char **envp, error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; - error = do_execve(filename, argv, envp, ®s); + error = do_execve(filename, argv, envp, regs); putname(filename); out: return error; @@ -510,12 +502,6 @@ thread_saved_pc(task_t *t) return 0; } -/* - * These bracket the sleeping functions.. - */ -#define first_sched ((unsigned long) scheduling_functions_start_here) -#define last_sched ((unsigned long) scheduling_functions_end_here) - unsigned long get_wchan(struct task_struct *p) { @@ -534,7 +520,7 @@ get_wchan(struct task_struct *p) */ pc = thread_saved_pc(p); - if (pc >= first_sched && pc < last_sched) { + if (in_sched_functions(pc)) { schedule_frame = ((unsigned long *)p->thread_info->pcb.ksp)[6]; return ((unsigned long *)schedule_frame)[12]; }