diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index e6ce943099a0..11cb264f59ce 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/tick.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
16 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
@@ -52,6 +53,7 @@ void __noreturn cpu_idle(void) | |||
52 | { | 53 | { |
53 | /* endless idle loop with no priority at all */ | 54 | /* endless idle loop with no priority at all */ |
54 | while (1) { | 55 | while (1) { |
56 | tick_nohz_stop_sched_tick(); | ||
55 | while (!need_resched()) { | 57 | while (!need_resched()) { |
56 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG | 58 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG |
57 | extern void smtc_idle_loop_hook(void); | 59 | extern void smtc_idle_loop_hook(void); |
@@ -61,6 +63,7 @@ void __noreturn cpu_idle(void) | |||
61 | if (cpu_wait) | 63 | if (cpu_wait) |
62 | (*cpu_wait)(); | 64 | (*cpu_wait)(); |
63 | } | 65 | } |
66 | tick_nohz_restart_sched_tick(); | ||
64 | preempt_enable_no_resched(); | 67 | preempt_enable_no_resched(); |
65 | schedule(); | 68 | schedule(); |
66 | preempt_disable(); | 69 | preempt_disable(); |
@@ -199,13 +202,13 @@ void elf_dump_regs(elf_greg_t *gp, struct pt_regs *regs) | |||
199 | #endif | 202 | #endif |
200 | } | 203 | } |
201 | 204 | ||
202 | int dump_task_regs (struct task_struct *tsk, elf_gregset_t *regs) | 205 | int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) |
203 | { | 206 | { |
204 | elf_dump_regs(*regs, task_pt_regs(tsk)); | 207 | elf_dump_regs(*regs, task_pt_regs(tsk)); |
205 | return 1; | 208 | return 1; |
206 | } | 209 | } |
207 | 210 | ||
208 | int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr) | 211 | int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpr) |
209 | { | 212 | { |
210 | memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu)); | 213 | memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu)); |
211 | 214 | ||
@@ -231,8 +234,8 @@ long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
231 | regs.cp0_epc = (unsigned long) kernel_thread_helper; | 234 | regs.cp0_epc = (unsigned long) kernel_thread_helper; |
232 | regs.cp0_status = read_c0_status(); | 235 | regs.cp0_status = read_c0_status(); |
233 | #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) | 236 | #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) |
234 | regs.cp0_status &= ~(ST0_KUP | ST0_IEC); | 237 | regs.cp0_status = (regs.cp0_status & ~(ST0_KUP | ST0_IEP | ST0_IEC)) | |
235 | regs.cp0_status |= ST0_IEP; | 238 | ((regs.cp0_status & (ST0_KUC | ST0_IEC)) << 2); |
236 | #else | 239 | #else |
237 | regs.cp0_status |= ST0_EXL; | 240 | regs.cp0_status |= ST0_EXL; |
238 | #endif | 241 | #endif |