diff options
Diffstat (limited to 'arch/tile/kernel/process.c')
| -rw-r--r-- | arch/tile/kernel/process.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 985cc28c74c5..84c29111756c 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
| @@ -408,6 +408,15 @@ static void save_arch_state(struct thread_struct *t) | |||
| 408 | #if CHIP_HAS_PROC_STATUS_SPR() | 408 | #if CHIP_HAS_PROC_STATUS_SPR() |
| 409 | t->proc_status = __insn_mfspr(SPR_PROC_STATUS); | 409 | t->proc_status = __insn_mfspr(SPR_PROC_STATUS); |
| 410 | #endif | 410 | #endif |
| 411 | #if !CHIP_HAS_FIXED_INTVEC_BASE() | ||
| 412 | t->interrupt_vector_base = __insn_mfspr(SPR_INTERRUPT_VECTOR_BASE_0); | ||
| 413 | #endif | ||
| 414 | #if CHIP_HAS_TILE_RTF_HWM() | ||
| 415 | t->tile_rtf_hwm = __insn_mfspr(SPR_TILE_RTF_HWM); | ||
| 416 | #endif | ||
| 417 | #if CHIP_HAS_DSTREAM_PF() | ||
| 418 | t->dstream_pf = __insn_mfspr(SPR_DSTREAM_PF); | ||
| 419 | #endif | ||
| 411 | } | 420 | } |
| 412 | 421 | ||
| 413 | static void restore_arch_state(const struct thread_struct *t) | 422 | static void restore_arch_state(const struct thread_struct *t) |
| @@ -428,14 +437,14 @@ static void restore_arch_state(const struct thread_struct *t) | |||
| 428 | #if CHIP_HAS_PROC_STATUS_SPR() | 437 | #if CHIP_HAS_PROC_STATUS_SPR() |
| 429 | __insn_mtspr(SPR_PROC_STATUS, t->proc_status); | 438 | __insn_mtspr(SPR_PROC_STATUS, t->proc_status); |
| 430 | #endif | 439 | #endif |
| 440 | #if !CHIP_HAS_FIXED_INTVEC_BASE() | ||
| 441 | __insn_mtspr(SPR_INTERRUPT_VECTOR_BASE_0, t->interrupt_vector_base); | ||
| 442 | #endif | ||
| 431 | #if CHIP_HAS_TILE_RTF_HWM() | 443 | #if CHIP_HAS_TILE_RTF_HWM() |
| 432 | /* | 444 | __insn_mtspr(SPR_TILE_RTF_HWM, t->tile_rtf_hwm); |
| 433 | * Clear this whenever we switch back to a process in case | 445 | #endif |
| 434 | * the previous process was monkeying with it. Even if enabled | 446 | #if CHIP_HAS_DSTREAM_PF() |
| 435 | * in CBOX_MSR1 via TILE_RTF_HWM_MIN, it's still just a | 447 | __insn_mtspr(SPR_DSTREAM_PF, t->dstream_pf); |
| 436 | * performance hint, so isn't worth a full save/restore. | ||
| 437 | */ | ||
| 438 | __insn_mtspr(SPR_TILE_RTF_HWM, 0); | ||
| 439 | #endif | 448 | #endif |
| 440 | } | 449 | } |
| 441 | 450 | ||
| @@ -561,8 +570,9 @@ out: | |||
| 561 | } | 570 | } |
| 562 | 571 | ||
| 563 | #ifdef CONFIG_COMPAT | 572 | #ifdef CONFIG_COMPAT |
| 564 | long _compat_sys_execve(char __user *path, compat_uptr_t __user *argv, | 573 | long _compat_sys_execve(const char __user *path, |
| 565 | compat_uptr_t __user *envp, struct pt_regs *regs) | 574 | const compat_uptr_t __user *argv, |
| 575 | const compat_uptr_t __user *envp, struct pt_regs *regs) | ||
| 566 | { | 576 | { |
| 567 | long error; | 577 | long error; |
| 568 | char *filename; | 578 | char *filename; |
| @@ -657,7 +667,7 @@ void show_regs(struct pt_regs *regs) | |||
| 657 | regs->regs[51], regs->regs[52], regs->tp); | 667 | regs->regs[51], regs->regs[52], regs->tp); |
| 658 | pr_err(" sp : "REGFMT" lr : "REGFMT"\n", regs->sp, regs->lr); | 668 | pr_err(" sp : "REGFMT" lr : "REGFMT"\n", regs->sp, regs->lr); |
| 659 | #else | 669 | #else |
| 660 | for (i = 0; i < 52; i += 3) | 670 | for (i = 0; i < 52; i += 4) |
| 661 | pr_err(" r%-2d: "REGFMT" r%-2d: "REGFMT | 671 | pr_err(" r%-2d: "REGFMT" r%-2d: "REGFMT |
| 662 | " r%-2d: "REGFMT" r%-2d: "REGFMT"\n", | 672 | " r%-2d: "REGFMT" r%-2d: "REGFMT"\n", |
| 663 | i, regs->regs[i], i+1, regs->regs[i+1], | 673 | i, regs->regs[i], i+1, regs->regs[i+1], |
