diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-04 09:27:22 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-04 09:27:22 -0800 |
commit | f2cb4777f67222da92bdf473ed913ac7bb3873cd (patch) | |
tree | 19c2c2a909d8cdddd0ad5b5e1130702acb4de5b4 /arch/arc/include/asm/processor.h | |
parent | 97754e3c5ae814a308c5ddfb08f8d2dc3dcb1b47 (diff) | |
parent | 3240dd57e533da94998029af6e17008a1806c665 (diff) |
Merge tag 'arc-4.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta:
- Fix for /proc/<pid>/maps "stack" vma annotation
- sched stats not printing correct sleeping task PC
- perf not reporting page faults
* tag 'arc-4.0-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: Fix thread_saved_pc()
ARC: Fix KSTK_ESP()
ARC: perf: Enable generic software events
ARC: Make arc_unwind_core accessible externally
Diffstat (limited to 'arch/arc/include/asm/processor.h')
-rw-r--r-- | arch/arc/include/asm/processor.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index 4e547296831..52312cb5dbe 100644 --- a/arch/arc/include/asm/processor.h +++ b/arch/arc/include/asm/processor.h @@ -47,9 +47,6 @@ struct thread_struct { /* Forward declaration, a strange C thing */ struct task_struct; -/* Return saved PC of a blocked thread */ -unsigned long thread_saved_pc(struct task_struct *t); - #define task_pt_regs(p) \ ((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1) @@ -72,18 +69,21 @@ unsigned long thread_saved_pc(struct task_struct *t); #define release_segments(mm) do { } while (0) #define KSTK_EIP(tsk) (task_pt_regs(tsk)->ret) +#define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp) /* * Where abouts of Task's sp, fp, blink when it was last seen in kernel mode. * Look in process.c for details of kernel stack layout */ -#define KSTK_ESP(tsk) (tsk->thread.ksp) +#define TSK_K_ESP(tsk) (tsk->thread.ksp) -#define KSTK_REG(tsk, off) (*((unsigned int *)(KSTK_ESP(tsk) + \ +#define TSK_K_REG(tsk, off) (*((unsigned int *)(TSK_K_ESP(tsk) + \ sizeof(struct callee_regs) + off))) -#define KSTK_BLINK(tsk) KSTK_REG(tsk, 4) -#define KSTK_FP(tsk) KSTK_REG(tsk, 0) +#define TSK_K_BLINK(tsk) TSK_K_REG(tsk, 4) +#define TSK_K_FP(tsk) TSK_K_REG(tsk, 0) + +#define thread_saved_pc(tsk) TSK_K_BLINK(tsk) extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp); |