From 28b9b5edea89c967aca4c6747260c7ed348806ef Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Mon, 12 Sep 2005 08:25:52 -0700 Subject: [PATCH] --- yaml --- r: 8645 b: refs/heads/master c: c3242291382c4ee2a30f4ef62270cd1c8a5b923f h: refs/heads/master i: 8643: 5a7113014d42976e8081ab4a272f058faa0d52ac v: v3 --- [refs] | 2 +- trunk/arch/i386/kernel/entry.S | 4 +- trunk/kernel/sched.c | 70 +++++++++++++++++++++------------- 3 files changed, 47 insertions(+), 29 deletions(-) diff --git a/[refs] b/[refs] index 76151c2233df..b01edac7f7c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 89ecf38c7aee6eb3f6aaf40a6d196ddff4b6d4a8 +refs/heads/master: c3242291382c4ee2a30f4ef62270cd1c8a5b923f diff --git a/trunk/arch/i386/kernel/entry.S b/trunk/arch/i386/kernel/entry.S index 3aad03839660..9e24f7b207ee 100644 --- a/trunk/arch/i386/kernel/entry.S +++ b/trunk/arch/i386/kernel/entry.S @@ -319,7 +319,7 @@ work_notifysig: # deal with pending signals and # vm86-space xorl %edx, %edx call do_notify_resume - jmp restore_all + jmp resume_userspace ALIGN work_notifysig_v86: @@ -329,7 +329,7 @@ work_notifysig_v86: movl %eax, %esp xorl %edx, %edx call do_notify_resume - jmp restore_all + jmp resume_userspace # perform syscall exit tracing ALIGN diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index e9ff04a9b56d..81b3a96ed2d0 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -3576,32 +3576,6 @@ task_t *idle_task(int cpu) return cpu_rq(cpu)->idle; } -/** - * curr_task - return the current task for a given cpu. - * @cpu: the processor in question. - */ -task_t *curr_task(int cpu) -{ - return cpu_curr(cpu); -} - -/** - * set_curr_task - set the current task for a given cpu. - * @cpu: the processor in question. - * @p: the task pointer to set. - * - * Description: This function must only be used when non-maskable interrupts - * are serviced on a separate stack. It allows the architecture to switch the - * notion of the current task on a cpu in a non-blocking manner. This function - * must be called with interrupts disabled, the caller must save the original - * value of the current task (see curr_task() above) and restore that value - * before reenabling interrupts. - */ -void set_curr_task(int cpu, task_t *p) -{ - cpu_curr(cpu) = p; -} - /** * find_process_by_pid - find a process with a matching PID value. * @pid: the pid in question. @@ -5628,3 +5602,47 @@ void normalize_rt_tasks(void) } #endif /* CONFIG_MAGIC_SYSRQ */ + +#ifdef CONFIG_IA64 +/* + * These functions are only useful for the IA64 MCA handling. + * + * They can only be called when the whole system has been + * stopped - every CPU needs to be quiescent, and no scheduling + * activity can take place. Using them for anything else would + * be a serious bug, and as a result, they aren't even visible + * under any other configuration. + */ + +/** + * curr_task - return the current task for a given cpu. + * @cpu: the processor in question. + * + * ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED! + */ +task_t *curr_task(int cpu) +{ + return cpu_curr(cpu); +} + +/** + * set_curr_task - set the current task for a given cpu. + * @cpu: the processor in question. + * @p: the task pointer to set. + * + * Description: This function must only be used when non-maskable interrupts + * are serviced on a separate stack. It allows the architecture to switch the + * notion of the current task on a cpu in a non-blocking manner. This function + * must be called with all CPU's synchronized, and interrupts disabled, the + * and caller must save the original value of the current task (see + * curr_task() above) and restore that value before reenabling interrupts and + * re-starting the system. + * + * ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED! + */ +void set_curr_task(int cpu, task_t *p) +{ + cpu_curr(cpu) = p; +} + +#endif